-
Notifications
You must be signed in to change notification settings - Fork 0
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 to publish docker images #9
Conversation
A few questions:
|
|
|
@aditijannu How do you see automatic publishing of the images? Should it be triggered manually maybe? |
There is github actions event |
8417fdf
to
7c3bb04
Compare
@aditijannu Updated the PR with an additional job that is triggered only on PR merge. The built images are exchanged between jobs using |
path: /tmp/enclave-base | ||
- name: Load enclave-base image | ||
run: | | ||
docker load --input /tmp/enclave-base/enclave-base.tar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we include a hard coded version tag here and check that the image doesn't already exist?
docker tag $IMGNAME $IMGNAME:$IMGTAG
where IMGNAME= enclave-base or parent-base and IMGTAG is maybe 2.0.0
and then docker manifest inspect $IMGNAME:$IMGTAG
>> If this command fails then the image doesn't exist and the workflow is a success. If this command succeeds, it means the image already exists and we should update the version tag. This will enforce users to update the tag whenever there is an update to the docker images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added tag files in the latest commit, please take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update references of 513076507034.dkr.ecr.us-west-1.amazonaws.com/nitro-parent-base
and 513076507034.dkr.ecr.us-west-1.amazonaws.com/nitro-enclave-base
throughout the repository. For the purpose of the first image you can simply make a copy of whats in the s3 in our docker hub i.e.
docker tag 513076......amazonaws.com/nitro-parent-base:1.1.4 fortanix/nitro-parent-base:2.0.0
docker push fortanix/nitro-parent-base:2.0.0
similarly for enclave-base
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed to fortanix
:
- https://hub.docker.com/r/fortanix/nitro-enclave-base/tags
- https://hub.docker.com/r/fortanix/nitro-parent-base/tags
Proof that those are the latest versions:
aws ecr describe-images --repository-name nitro-parent-base --region us-west-1 --output json | jq '.imageDetails[].imageTags'
[
"1.0.2"
]
[
"1.0.0"
]
[
"1.1.1"
]
[
"1.0.4"
]
[
"1.0.3"
]
[
"1.1.2"
]
[
"1.1.3"
]
[
"1.1.0"
]
[
"1.0.1"
]
aws ecr describe-images --repository-name nitro-enclave-base --region us-west-1 --output json | jq '.imageDetails[].imageTags'
[
"1.0.1"
]
[
"1.0.2"
]
[
"1.0.0"
]
I have kept the original version tags to not add confusion with a sudden bump in version without making any updates to the images.
Creates a new Github action that builds and publishes
enclave-base
andparent-base
image into https://hub.docker.com/u/fortanix docker repository. The action is triggered only when someone makes a change to any file in the corresponding folders.While this solution lacks versioning support like the previous iteration, where we had a
tag
file specifying image version, I am not fully sure that it is needed right now as those images are updated rarely and there was never a need for backward compatibility.