-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Adding dockerfile and ci/cd #875
Conversation
bff7358
to
7752833
Compare
Fixed stefanberger#869 Used multi-stage build here to reduce final image size. Builder should have packages for dev and compile. Final image should only have dependencies for runtime. Building is simple using `docker build .` command. Or `docker build --build-arg="LIBTPMS_BRANCH=v0.9.6" .` if you want another branch/tag of libtpms. Next patch will add: - linter - build - tpm2 tools testing Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Fixes stefanberger#869 Using popular Hadolint linter for dockers. Using standard GitHub action for building. Build will also publish to GHCR after PR is merged, not before. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Auto testing as well as good example on: how to run SWTPM in docker or compose. Simply run `docker-compose up` to bring both swtpm and test. Or run `docker-compose up --build --force-recreate` to re-build. Or run `docker-compose up swtpm` to only start swtpm service without test. Added new job in the github action to automate this as well. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
It is better to have it as separate action. So it can grow with nore thiungs to do on release. It calls existing docker build and push to avoid duplication. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
@stefanberger can you merge this , please ? Travis CI passed |
Thanks! |
I had to fix the Dockerfile for github ci/cd since it started to fail due to an update of libtpms adding a new API call that then wasn't available to swtpm because the libtpms build didn't happen and the old version of libtpms was used: PR #898 |
@stefanberger one way to do it easily is add
in this way every time to checkout so docker build and all other builds, will just do normal checkout of every time you need to bump the WDYT ? another option - I exposed another option - add swtpm/.github/workflows/docker.yaml Line 76 in 607eb54
|
Fixes #869