Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Fix Docker build workflow #46

Merged
merged 2 commits into from
Sep 28, 2021
Merged

ci: Fix Docker build workflow #46

merged 2 commits into from
Sep 28, 2021

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Sep 18, 2021

Fix the Docker build CI

To run recast run testing/busyboxtest --backend docker ensure that the environmental variable RECASE_DOCKER_IMAGE is set to the value of the image that was just build in CI. Additionally, running recast locally requires that it is both installed and that graphviz is installed too.

To run recast run testing/busyboxtest --backend docker in GitHub Actions CI requires some additional work to get the Docker in Docker setup. For the time being, be content with the build tests of the Dockerfile and local testing elsewhere.

c.f. Issue #50

The equivalent to running

recast run testing/busyboxtest --backend local

is still being run in

- name: Run unit tests
run: |
python -m pytest tests

@matthewfeickert
Copy link
Member Author

@lukasheinrich How important is it that the base image is Alpine based?

FROM docker:20.10.5
RUN apk add py-pip automake autoconf libtool \

$ docker run --rm docker:20.10.5 /bin/sh -c 'cat /etc/os-release'
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.13.4
PRETTY_NAME="Alpine Linux v3.13"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"

@lukasheinrich
Copy link
Contributor

@matthewfeickert no it doesn't.. it might date back to a timee where I didn't quite appreciate that alpine is not that great ;)

@matthewfeickert
Copy link
Member Author

matthewfeickert commented Sep 18, 2021

it might date back to a timee where I didn't quite appreciate that alpine is not that great ;)

Okay cool. 🙂 Great for many things!...just not always Python wheels. :P

@lukasheinrich
Copy link
Contributor

ah another reason is that the base image (for docker in docker) is based no alipine

@matthewfeickert
Copy link
Member Author

ah another reason is that the base image (for docker in docker) is based no alipine

I don't actually have much experience with docker in docker workflows. Is there anything in particular we need to care about there? Or should we just be able to update to using python:3.8-slim-buster as the base image?

@lukasheinrich
Copy link
Contributor

if we can install the docker daemon in that image, that could work, but I haven't tried that.

@matthewfeickert matthewfeickert marked this pull request as ready for review September 19, 2021 20:17
@matthewfeickert
Copy link
Member Author

matthewfeickert commented Sep 19, 2021

@lukasheinrich This is ready for review. Let me know if you have any questions.

We can change the Docker image itself in another PR.

To run `recast run testing/busyboxtest --backend docker` in GitHub
Actions CI requires some additional work to get the Docker in Docker
setup. For the time being, be content with the build tests of the
Dockerfile and local testing elsewhere.

For follow up c.f. Issue #50
@matthewfeickert
Copy link
Member Author

(sorry, hit "request review" about a second after you hit "approve" so it sent it back to you)

@matthewfeickert
Copy link
Member Author

@lukasheinrich This is ready to go in if you're happy with it.

@matthewfeickert
Copy link
Member Author

@lukasheinrich just pinging. If there's nothing else to do here now this is ready for merge.

@lukasheinrich lukasheinrich merged commit b2bce11 into recast-hep:master Sep 28, 2021
@lukasheinrich
Copy link
Contributor

Thanks!

@matthewfeickert matthewfeickert deleted the ci/fix-docker-ci branch September 28, 2021 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants