Skip to content

Commit fc32581

Browse files
Build System - Make bash an optional entry
This allows us to build via docker on the command line, in a script, rather than interactively entering commands manually. For example, you can build and run a compile like this (on Windows cmd.exe): > docker buildx build --file "C:\path\to\mayaMatchMoveSolver\share\docker\Dockerfile_maya2020" -t mmsolver-linux-maya2020-build "C:\path\to\mayaMatchMoveSolver" > docker buildx build --file "C:\path\to\mayaMatchMoveSolver\share\docker\Dockerfile_maya2020" -t mmsolver-linux-maya2020-build "C:\path\to\mayaMatchMoveSolver" docker container run --volume "C:\path\to\mayaMatchMoveSolver:/mmSolver" mmsolver-linux-maya2020-build "bash -c './scripts/build_mmSolver_linux_maya2020.bash'"
1 parent 1c9f607 commit fc32581

File tree

7 files changed

+21
-19
lines changed

7 files changed

+21
-19
lines changed

BUILD_LINUX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ On a Linux (or Windows) host Bash or Power Shell terminal, run:
1616
```commandline
1717
$ cd <project root>
1818
$ docker build --file share/docker/Dockerfile_mayaXXXX -t mmsolver-linux-mayaXXXX-build .
19-
$ docker run --rm --interactive --volume "${pwd}:/mmSolver" --tty mmsolver-linux-mayaXXXX-build
19+
$ docker run --rm --interactive --volume "${pwd}:/mmSolver" --tty mmsolver-linux-mayaXXXX-build bash
2020
2121
# Inside the docker container
2222
$ ./scripts/build_mmSolver_linux_mayaXXXX.bash

share/docker/Dockerfile_maya2019

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# $ cd /path/to/project/root/mayaMatchMoveSolver/
44
# $ docker build --file share/docker/Dockerfile_maya2019 -t mmsolver-linux-maya2019-build .
5-
# $ docker run --rm --interactive --volume "${PWD}:/mmSolver" --tty mmsolver-linux-maya2019-build
5+
# $ docker run --rm --interactive --volume "${PWD}:/mmSolver" --tty mmsolver-linux-maya2019-build bash
66
#
77
#
88
# Once the docker image is built and run, you can execute the
@@ -147,6 +147,7 @@ RUN yum install --assumeyes \
147147
# TODO: Define a minimum Rust version to install.
148148
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
149149
&& source ${HOME}/.cargo/env
150+
ENV PATH=/root/.cargo/bin:$PATH
150151

151152
# Install Maya from archive.
152153
ADD ./external/archives/Autodesk_Maya_2019_Linux_64bit.tgz /temp
@@ -166,5 +167,4 @@ ENTRYPOINT [ \
166167
"rh-python36", \
167168
"devtoolset-6", \
168169
"llvm-toolset-7", \
169-
"rh-git218", \
170-
"bash"]
170+
"rh-git218" ]

share/docker/Dockerfile_maya2020

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# $ cd /path/to/project/root/mayaMatchMoveSolver/
44
# $ docker build --file share/docker/Dockerfile_maya2020 -t mmsolver-linux-maya2020-build .
5-
# $ docker run --rm --interactive --volume "${PWD}:/mmSolver" --tty mmsolver-linux-maya2020-build
5+
# $ docker run --rm --interactive --volume "${PWD}:/mmSolver" --tty mmsolver-linux-maya2020-build bash
66
#
77
#
88
# Once the docker image is built and run, you can execute the
@@ -144,6 +144,7 @@ RUN yum install --assumeyes \
144144
# TODO: Define a minimum Rust version to install.
145145
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
146146
&& source ${HOME}/.cargo/env
147+
ENV PATH=/root/.cargo/bin:$PATH
147148

148149
# Install Maya from archive.
149150
ADD ./external/archives/Autodesk_Maya_2020_ML_Linux_64bit.tgz /temp
@@ -163,5 +164,4 @@ ENTRYPOINT [ \
163164
"rh-python36", \
164165
"devtoolset-6", \
165166
"llvm-toolset-7", \
166-
"rh-git218", \
167-
"bash"]
167+
"rh-git218" ]

share/docker/Dockerfile_maya2022

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# $ cd /path/to/project/root/mayaMatchMoveSolver/
44
# $ docker build --file share/docker/Dockerfile_maya2022 -t mmsolver-linux-maya2022-build .
5-
# $ docker run --rm --interactive --volume "${PWD}:/mmSolver" --tty mmsolver-linux-maya2022-build
5+
# $ docker run --rm --interactive --volume "${PWD}:/mmSolver" --tty mmsolver-linux-maya2022-build bash
66
#
77
#
88
# Once the docker image is built and run, you can execute the
@@ -151,6 +151,7 @@ RUN yum install --assumeyes \
151151
# TODO: Define a minimum Rust version to install.
152152
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
153153
&& source ${HOME}/.cargo/env
154+
ENV PATH=/root/.cargo/bin:$PATH
154155

155156
# Install Maya from archive.
156157
ADD ./external/archives/Autodesk_Maya_2022_ML_Linux_64bit.tgz /temp
@@ -170,5 +171,4 @@ ENTRYPOINT [ \
170171
"rh-python36", \
171172
"devtoolset-9", \
172173
"llvm-toolset-7", \
173-
"rh-git218", \
174-
"bash"]
174+
"rh-git218" ]

share/docker/Dockerfile_maya2023

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# $ cd /path/to/project/root/mayaMatchMoveSolver/
44
# $ docker build --file share/docker/Dockerfile_maya2023 -t mmsolver-linux-maya2023-build .
5-
# $ docker run --rm --interactive --volume "${PWD}:/mmSolver" --tty mmsolver-linux-maya2023-build
5+
# $ docker run --rm --interactive --volume "${PWD}:/mmSolver" --tty mmsolver-linux-maya2023-build bash
66
#
77
#
88
# Once the docker image is built and run, you can execute the
@@ -151,6 +151,7 @@ RUN yum install --assumeyes \
151151
# TODO: Define a minimum Rust version to install.
152152
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
153153
&& source ${HOME}/.cargo/env
154+
ENV PATH=/root/.cargo/bin:$PATH
154155

155156
# Install Maya from archive.
156157
ADD ./external/archives/Autodesk_Maya_2023_ML_Linux_64bit.tgz /temp
@@ -170,5 +171,4 @@ ENTRYPOINT [ \
170171
"rh-python36", \
171172
"devtoolset-9", \
172173
"llvm-toolset-7", \
173-
"rh-git218", \
174-
"bash"]
174+
"rh-git218" ]

share/docker/Dockerfile_maya2024

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# $ cd /path/to/project/root/mayaMatchMoveSolver/
44
# $ docker build --file share/docker/Dockerfile_maya2024 -t mmsolver-linux-maya2024-build .
5-
# $ docker run --rm --interactive --volume "${PWD}:/mmSolver" --tty mmsolver-linux-maya2024-build
5+
# $ docker run --rm --interactive --volume "${PWD}:/mmSolver" --tty mmsolver-linux-maya2024-build bash
66
#
77
#
88
# Once the docker image is built and run, you can execute the
@@ -49,7 +49,7 @@ RUN dnf install --assumeyes \
4949
nss \
5050
libnsl \
5151
dbus \
52-
redhat-lsb-core \
52+
redhat-lsb-core \
5353
pcre-utf16 \
5454
pciutils \
5555
libXdamage
@@ -136,6 +136,7 @@ RUN dnf install --assumeyes \
136136
# TODO: Define a minimum Rust version to install.
137137
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
138138
&& source ${HOME}/.cargo/env
139+
ENV PATH=/root/.cargo/bin:$PATH
139140

140141
# Development tools for Maya 2024.
141142
RUN dnf install --assumeyes \
@@ -161,4 +162,4 @@ ENV MAYA_DISABLE_CIP=1
161162
WORKDIR /mmSolver
162163

163164
# Maya 2024 development environment.
164-
ENTRYPOINT [ "scl", "enable", "gcc-toolset-11", "bash" ]
165+
ENTRYPOINT [ "scl", "enable", "gcc-toolset-11" ]

share/docker/Dockerfile_maya2025

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# $ cd /path/to/project/root/mayaMatchMoveSolver/
44
# $ docker build --file share/docker/Dockerfile_maya2025 -t mmsolver-linux-maya2025-build .
5-
# $ docker run --rm --interactive --volume "${PWD}:/mmSolver" --tty mmsolver-linux-maya2025-build
5+
# $ docker run --rm --interactive --volume "${PWD}:/mmSolver" --tty mmsolver-linux-maya2025-build bash
66
#
77
#
88
# Once the docker image is built and run, you can execute the
@@ -49,7 +49,7 @@ RUN dnf install --assumeyes \
4949
nss \
5050
libnsl \
5151
dbus \
52-
redhat-lsb-core \
52+
redhat-lsb-core \
5353
pcre-utf16 \
5454
pciutils \
5555
libXdamage
@@ -135,6 +135,7 @@ RUN dnf install --assumeyes \
135135
# TODO: Define a minimum Rust version to install.
136136
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
137137
&& source ${HOME}/.cargo/env
138+
ENV PATH=/root/.cargo/bin:$PATH
138139

139140
# Development tools for Maya 2025.
140141
RUN dnf install --assumeyes \
@@ -160,4 +161,4 @@ ENV MAYA_DISABLE_CIP=1
160161
WORKDIR /mmSolver
161162

162163
# Maya 2025 development environment.
163-
ENTRYPOINT [ "scl", "enable", "gcc-toolset-11", "bash" ]
164+
ENTRYPOINT [ "scl", "enable", "gcc-toolset-11" ]

0 commit comments

Comments
 (0)