Skip to content

Commit

Permalink
update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Mar 29, 2021
1 parent 415fa3c commit c53d0fe
Show file tree
Hide file tree
Showing 12 changed files with 197 additions and 17 deletions.
18 changes: 9 additions & 9 deletions tools/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ These docker images are based on CentOS6 for a maximum compatibility accross all

## Downloading the pre-built Natron SDK images

The `natrongithub/natron-sdk-centos6-dts8:latest` and `natrongithub/natron-sdk-centos6:latest` docker images are available from [Docker Hub].
The `natrongithub/natron-sdk` docker image is available from [Docker Hub], and it is an alias to `natrongithub/natron-sdk-centos7` and ``natrongithub/natron-sdk-centos7-dts8`.

To download these images, for the [64-bit SDK] execute:
```
docker pull natrongithub/natron-sdk-centos6-dts8
docker pull natrongithub/natron-sdk
```
and for the [32-bit SDK]:
```
docker pull natrongithub/natron-sdk-i386-centos6
docker pull natrongithub/natron-sdk-i386
```

## Launching a build
Expand All @@ -24,15 +24,15 @@ To launch a build:
- create a directory for the builds (`$(pwd)/builds` in the following), and launch a build that binds this directory to `/home/builds_archive`:
```
mkdir builds
docker run -it --rm --mount src="$(pwd)/builds",target=/home/builds_archive,type=bind natrongithub/natron-sdk-centos6-dts8:latest
docker run -it --rm --mount src="$(pwd)/builds",target=/home/builds_archive,type=bind natrongithub/natron-sdk:latest
```
(for the 32-bit version, use `natrongithub/natron-sdk-i386-centos6:latest` instead of `natrongithub/natron-sdk-centos6-dts8:latest`)
(for the 32-bit version, use `natrongithub/natron-sdk-i386:latest` instead of `natrongithub/natron-sdk:latest`)

By default, this launches a snapshot build, but you may want to customize build variables, which appear when the build starts and are described at the top of `tools/jenkins/launchBuildMain.sh`. This can be done by adding the following options to the `docker run`command: `--env VAR1=value1 --env VAR2=value2 ...`.

For example, to limit the number of parallel build jobs to 2:
```
docker run -it --rm --mount src="$(pwd)/builds",target=/home/builds_archive,type=bind --env MKJOBS=2 natrongithub/natron-sdk-centos6-dts8:latest
docker run -it --rm --mount src="$(pwd)/builds",target=/home/builds_archive,type=bind --env MKJOBS=2 natrongithub/natron-sdk:latest
```


Expand All @@ -43,7 +43,7 @@ docker run -it --rm --mount src="$(pwd)/builds",target=/home/builds_archive,type
If `GIT_URL` is not an official Natron repository (as listed in [gitRepositories.sh](https://github.com/NatronGitHub/Natron/blob/master/tools/jenkins/gitRepositories.sh)), `GIT_URL_IS_NATRON=1` can be used to force a Natron build, as in the following example, which launches a build from branch `SetDefaultProjectFormat` of repository `https://github.com/rodlie/Natron.git`.

```
docker run -it --rm --mount src="$(pwd)/builds",target=/home/builds_archive,type=bind --env GIT_URL_IS_NATRON=1 --env GIT_URL=https://github.com/rodlie/Natron.git --env GIT_BRANCH=SetDefaultProjectFormat natrongithub/natron-sdk-centos6-dts8:latest
docker run -it --rm --mount src="$(pwd)/builds",target=/home/builds_archive,type=bind --env GIT_URL_IS_NATRON=1 --env GIT_URL=https://github.com/rodlie/Natron.git --env GIT_BRANCH=SetDefaultProjectFormat natrongithub/natron-sdk:latest
```


Expand All @@ -54,7 +54,7 @@ To launch a release, the Natron and plugins repositories must have the appropria
When launching the build, `RELEASE_TAG` must be set to the version number (eg "2.3.15") and `NATRON_BUILD_NUMBER` must be set to an integer value (typically 1 for the first build, and increment for each new build after fixing issues). See [launchBuildMain.sh](https://github.com/NatronGitHub/Natron/blob/master/tools/jenkins/launchBuildMain.sh#L340) for more details.

```
docker run -it --rm --env RELEASE_TAG=2.3.15 --env NATRON_BUILD_NUMBER=1 --env NATRON_DEV_STATUS=STABLE --mount src="$(pwd)/builds",target=/home/builds_archive,type=bind natrongithub/natron-sdk-centos6-dts8:latest
docker run -it --rm --env RELEASE_TAG=2.3.15 --env NATRON_BUILD_NUMBER=1 --env NATRON_DEV_STATUS=STABLE --mount src="$(pwd)/builds",target=/home/builds_archive,type=bind natrongithub/natron-sdk:latest
```


Expand All @@ -67,7 +67,7 @@ Other build options are documented at the beginning of the [launchBuildMain.sh](

If something goes bad during a build, you may want to launch it from an interactive shell instead.
```
docker run -it --rm --mount src="$(pwd)/artifacts",target=/home/jenkins_artifacts,type=bind --mount src="$(pwd)/builds",target=/home/builds_archive,type=bind natrongithub/natron-sdk-centos6-dts8:latest bash
docker run -it --rm --mount src="$(pwd)/artifacts",target=/home/jenkins_artifacts,type=bind --mount src="$(pwd)/builds",target=/home/builds_archive,type=bind natrongithub/natron-sdk:latest bash
```
Then you can execute manually `launchBuildMain.sh` from the shell.

Expand Down
2 changes: 2 additions & 0 deletions tools/docker/natron-sdk-centos6/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Dockerfile
.dockerignore
29 changes: 29 additions & 0 deletions tools/docker/natron-sdk-centos6/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Dockerfile
build-Linux-installer.sh
build-Linux-sdk.sh
build-OSX-installer.sh
build-Windows-installer.sh
build-natron.sh
build-plugins.sh
checkout-repository.sh
common.sh
compiler-common.sh
createBuildOptionsFile.sh
ensure-ssh-identity.sh
gen-natron-doc.sh
genDllVersions.sh
gitRepositories.sh
launchBuildMain.sh
linuxStartupJenkins.sh
macStartupJenkins.sh
manageBuildOptions.sh
manageLog.sh
msysStartupJenkins.sh
push.sh
runUnitTests.sh
uploadArtifactsMain.sh
zip-python.sh
include
pkg
builds
artifacts
16 changes: 16 additions & 0 deletions tools/docker/natron-sdk-centos6/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
cd `dirname "$0"`
cp ../../jenkins/*.sh .
(cd ../../jenkins/; tar cf - include) | tar xf -
export CENTOS=6
export DTS=8
LABEL="natrongithub/natron-sdk${UBUNTU+-ubuntu}${UBUNTU:-}${CENTOS+-centos}${CENTOS:-}${DTS+-dts}${DTS:-}"
env GEN_DOCKERFILE=1 ../../jenkins/include/scripts/build-Linux-sdk.sh > Dockerfile
docker build -t "${LABEL}:latest" .
#docker build --no-cache -t "${LABEL}:latest" .
echo "please execute:"
#echo "docker-squash ${LABEL}:latest"
echo "docker login"
echo "docker tag ${LABEL}:latest ${LABEL}:$(date -u +%Y%m%d)"
echo "docker push ${LABEL}:latest"
echo "docker push ${LABEL}:$(date -u +%Y%m%d)"
29 changes: 29 additions & 0 deletions tools/docker/natron-sdk-centos8/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Dockerfile
build-Linux-installer.sh
build-Linux-sdk.sh
build-OSX-installer.sh
build-Windows-installer.sh
build-natron.sh
build-plugins.sh
checkout-repository.sh
common.sh
compiler-common.sh
createBuildOptionsFile.sh
ensure-ssh-identity.sh
gen-natron-doc.sh
genDllVersions.sh
gitRepositories.sh
launchBuildMain.sh
linuxStartupJenkins.sh
macStartupJenkins.sh
manageBuildOptions.sh
manageLog.sh
msysStartupJenkins.sh
push.sh
runUnitTests.sh
uploadArtifactsMain.sh
zip-python.sh
include
pkg
builds
artifacts
16 changes: 16 additions & 0 deletions tools/docker/natron-sdk-centos8/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
cd `dirname "$0"`
cp ../../jenkins/*.sh .
(cd ../../jenkins/; tar cf - include) | tar xf -
export CENTOS=8
#export DTS=8
LABEL="natrongithub/natron-sdk${UBUNTU+-ubuntu}${UBUNTU:-}${CENTOS+-centos}${CENTOS:-}${DTS+-dts}${DTS:-}"
env GEN_DOCKERFILE=1 ../../jenkins/include/scripts/build-Linux-sdk.sh > Dockerfile
docker build -t "${LABEL}:latest" .
#docker build --no-cache -t "${LABEL}:latest" .
echo "please execute:"
#echo "docker-squash ${LABEL}:latest"
echo "docker login"
echo "docker tag ${LABEL}:latest ${LABEL}:$(date -u +%Y%m%d)"
echo "docker push ${LABEL}:latest"
echo "docker push ${LABEL}:$(date -u +%Y%m%d)"
6 changes: 3 additions & 3 deletions tools/docker/natron-sdk-i386/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
cd `dirname "$0"`
export CENTOS=6
#export DTS=8
LABEL="natrongithub/natron-sdk${CENTOS+-centos}${CENTOS:-}${DTS+-dts}${DTS:-}-i386"
if [ "${CENTOS:-6}" -gt 7 ]; then
echo "i386 is not supported on CentOS 8 and later"
LABEL="natrongithub/natron-sdk${UBUNTU+-ubuntu}${UBUNTU:-}${CENTOS+-centos}${CENTOS:-}${DTS+-dts}${DTS:-}-i386"
if [ -n "${UBUNTU:-}" ] || [ "${CENTOS:-6}" -gt 7 ]; then
echo "i386 is not supported on CentOS 8 and later or Ubuntu"
exit 1
fi
env GEN_DOCKERFILE32=1 ../../jenkins/include/scripts/build-Linux-sdk.sh> Dockerfile
Expand Down
29 changes: 29 additions & 0 deletions tools/docker/natron-sdk-ubuntu18.04/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Dockerfile
build-Linux-installer.sh
build-Linux-sdk.sh
build-OSX-installer.sh
build-Windows-installer.sh
build-natron.sh
build-plugins.sh
checkout-repository.sh
common.sh
compiler-common.sh
createBuildOptionsFile.sh
ensure-ssh-identity.sh
gen-natron-doc.sh
genDllVersions.sh
gitRepositories.sh
launchBuildMain.sh
linuxStartupJenkins.sh
macStartupJenkins.sh
manageBuildOptions.sh
manageLog.sh
msysStartupJenkins.sh
push.sh
runUnitTests.sh
uploadArtifactsMain.sh
zip-python.sh
include
pkg
builds
artifacts
15 changes: 15 additions & 0 deletions tools/docker/natron-sdk-ubuntu18.04/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
cd `dirname "$0"`
cp ../../jenkins/*.sh .
(cd ../../jenkins/; tar cf - include) | tar xf -
export UBUNTU=18.04
LABEL="natrongithub/natron-sdk${UBUNTU+-ubuntu}${UBUNTU:-}${CENTOS+-centos}${CENTOS:-}${DTS+-dts}${DTS:-}"
env GEN_DOCKERFILE=1 ../../jenkins/include/scripts/build-Linux-sdk.sh > Dockerfile
docker build -t "${LABEL}:latest" .
#docker build --no-cache -t "${LABEL}:latest" .
echo "please execute:"
#echo "docker-squash ${LABEL}:latest"
echo "docker login"
echo "docker tag ${LABEL}:latest ${LABEL}:$(date -u +%Y%m%d)"
echo "docker push ${LABEL}:latest"
echo "docker push ${LABEL}:$(date -u +%Y%m%d)"
29 changes: 29 additions & 0 deletions tools/docker/natron-sdk-ubuntu20.04/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Dockerfile
build-Linux-installer.sh
build-Linux-sdk.sh
build-OSX-installer.sh
build-Windows-installer.sh
build-natron.sh
build-plugins.sh
checkout-repository.sh
common.sh
compiler-common.sh
createBuildOptionsFile.sh
ensure-ssh-identity.sh
gen-natron-doc.sh
genDllVersions.sh
gitRepositories.sh
launchBuildMain.sh
linuxStartupJenkins.sh
macStartupJenkins.sh
manageBuildOptions.sh
manageLog.sh
msysStartupJenkins.sh
push.sh
runUnitTests.sh
uploadArtifactsMain.sh
zip-python.sh
include
pkg
builds
artifacts
15 changes: 15 additions & 0 deletions tools/docker/natron-sdk-ubuntu20.04/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
cd `dirname "$0"`
cp ../../jenkins/*.sh .
(cd ../../jenkins/; tar cf - include) | tar xf -
export UBUNTU=20.04
LABEL="natrongithub/natron-sdk${UBUNTU+-ubuntu}${UBUNTU:-}${CENTOS+-centos}${CENTOS:-}${DTS+-dts}${DTS:-}"
env GEN_DOCKERFILE=1 ../../jenkins/include/scripts/build-Linux-sdk.sh > Dockerfile
docker build -t "${LABEL}:latest" .
#docker build --no-cache -t "${LABEL}:latest" .
echo "please execute:"
#echo "docker-squash ${LABEL}:latest"
echo "docker login"
echo "docker tag ${LABEL}:latest ${LABEL}:$(date -u +%Y%m%d)"
echo "docker push ${LABEL}:latest"
echo "docker push ${LABEL}:$(date -u +%Y%m%d)"
10 changes: 5 additions & 5 deletions tools/docker/natron-sdk/build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/sh
cd `dirname "$0"`
export CENTOS=6
export DTS=8
LABEL="natrongithub/natron-sdk${CENTOS+-centos}${CENTOS:-}${DTS+-dts}${DTS:-}"
env GEN_DOCKERFILE=1 ../../jenkins/include/scripts/build-Linux-sdk.sh > Dockerfile
cp ../../jenkins/*.sh .
(cd ../../jenkins/; tar cf - include) | tar xf -
docker build -t "${LABEL}:latest" .
export CENTOS=7
export DTS=8
LABEL="natrongithub/natron-sdk${UBUNTU+-ubuntu}${UBUNTU:-}${CENTOS+-centos}${CENTOS:-}${DTS+-dts}${DTS:-}"
env GEN_DOCKERFILE=1 ../../jenkins/include/scripts/build-Linux-sdk.sh > Dockerfile
docker build -t "${LABEL}:latest" . --progress=plain
#docker build --no-cache -t "${LABEL}:latest" .
echo "please execute:"
#echo "docker-squash ${LABEL}:latest"
Expand Down

0 comments on commit c53d0fe

Please sign in to comment.