Skip to content

Commit

Permalink
Merge pull request #848 from SyneRBI/travis_set_buildkit
Browse files Browse the repository at this point in the history
Update .travis.yml to set DOCKER_BUILDKIT=1
  • Loading branch information
KrisThielemans authored Nov 23, 2023
2 parents 8c2263a + d89553b commit e29399c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 15 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
- '.github/workflows/*docker*'
- 'CITATION.cff'
- '.mailmap'
- '.travis.yml'
- 'NOTICE.txt'
- 'LICENSE.txt'

pull_request:
branches: [ master ]
Expand All @@ -22,6 +25,11 @@ on:
- 'jupyterhub/**'
- 'VirtualBox/**'
- '.github/workflows/*docker*'
- 'CITATION.cff'
- '.mailmap'
- '.travis.yml'
- 'NOTICE.txt'
- 'LICENSE.txt'


jobs:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,22 @@ on:
- '.github/workflows/c-cpp.yml'
- 'CITATION.cff'
- '.mailmap'
- '.travis.yml'
- 'NOTICE.txt'
- 'LICENSE.txt'

push:
branches: [ master ]
paths-ignore:
- '**.md'
- 'jupyterhub/**'
- 'VirtualBox/**'
- '.github/workflows/c-cpp.yml'
- 'CITATION.cff'
- '.mailmap'
- '.travis.yml'
- 'NOTICE.txt'
- 'LICENSE.txt'

jobs:
build-core:
Expand Down
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
branches:
only:
- master
# version
- /^v\d.*/

# Note: with `language: cpp`, `cache: ccache` works
# but `cache: pip` and `python:` is ignored
os:
Expand Down Expand Up @@ -53,6 +47,7 @@ jobs:
- $DCC pull core
# rebuild base image (using above docker cache)
- |
export DOCKER_BUILDKIT=1
if [[ "$DOCKER_BUILD" == *"CORE"* ]]; then ( set -ev
$DCC build --pull core
); else ( set -ev
Expand Down
25 changes: 16 additions & 9 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,14 @@ Service images are intended to be run in the background, and expose:

### Windows specific notes

Note that Docker for Windows uses the
[Hyper-V backend][hyper-vbox]. Unfortunately, this conflicts with VirtualBox (last checked start 2021) so you would
have to en/disable Hyper-V and reboot.
You can use the older VirtualBox backend instead by using [Docker Machine].
Note that Docker for Windows uses either WSL or Hyper-V backend (the latter might be incompatible with VirtualBox),
see its [documentation for more information][docker-windows].

You may want to consult [SIRF on Windows Subsystem for Linux][wiki-wsl]
regarding setting up Xserver/VNCserver and other UNIX-for-Windows-users tips.

[wiki-wsl]: https://github.com/SyneRBI/SIRF/wiki/SIRF-SuperBuild-on-Bash-on-Ubuntu-on-Windows-10
[hyper-vbox]: https://docs.docker.com/docker-for-windows/install/#what-to-know-before-you-install
[Docker Machine]: https://docs.docker.com/machine/overview/#whats-the-difference-between-docker-engine-and-docker-machine
[docker-windows]: https://docs.docker.com/docker-for-windows/install/

## Glossary

Expand Down Expand Up @@ -313,7 +310,7 @@ docker rmi <IMAGEID>
## Notes

- Since SIRF 3.5, by default the build files are removed on the docker image. This can be changed by [setting an environment variable](./DocForDevelopers.md#Useful-environment-variables).
If you have built the image while keeping all build files (or re-build them in an existing container), tests of SIRF and other installed packages can be run as follows:
If you have built the image while keeping all build files (or re-build them in an existing container), tests of SIRF and other installed packages can be run (on the docker image) as follows:
```bash
sudo -Hu jovyan bash --login -c /devel/test.sh
```
Expand Down Expand Up @@ -350,7 +347,7 @@ Solutions:



Problem: When trying to run `/sirf-compose-server-gpu up -d sirf` I get:
Problem: When trying to run `./sirf-compose-server-gpu up -d sirf` I get:
```
ERROR: The Compose file './docker-compose.srv-gpu.yml' is invalid because:
Unsupported config option for services.gadgetron: 'runtime'
Expand All @@ -364,8 +361,18 @@ Note that if you have python 2 and python 3 installed you may need to use `pip`
pip3 uninstall docker-compose
pip3 install docker-compose
```
#### docker build fails with "unknown flag"
If you see an error likely
```
Error response from daemon: dockerfile parse error line 58: Unknown flag: link
```
Your docker might default to an older version (this happens on Ubuntu 20.04 for instance). It might be resolved by doing
```bash
export DOCKER_BUILDKIT=1
```
(or the equivalent for your shell). If not, try to upgrade your docker daemon.

### Building problems related to gpg
#### Building problems related to gpg
When building a new docker image, you could see errors such as
```
W: http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg are ignored as the file is not readable by user '_apt' executing apt-key.
Expand Down

0 comments on commit e29399c

Please sign in to comment.