-
Notifications
You must be signed in to change notification settings - Fork 766
Build docker image on Circle CI #513
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
Build docker image on Circle CI #513
Conversation
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.
Very excited to see progress here.
.circleci/config.yml
Outdated
| - checkout | ||
| - run: docker build -t emscripten-core/emsdk:$CIRCLE_BRANCH docker/ | ||
| - run: | | ||
| echo "$DOCKER_PASS" | docker login --username $DOCKER_USER --password-stdin |
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.
Is this the recommended way to authenticate the push ? I wonder if we can pass login credentials directly to the push command somehow?
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.
This is from the CircleCI docs, yes. It is definitely possible to pass the password directly:
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" ...
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.
Pattern from the CircleCI docs, seems fine
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.
Looks odd, but also I've found that the recommended - more secure way for login.
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.
Error: Cannot perform an interactive login from a non TTY device
Looks like --password-stdin is not accepted here anyways? 🤔
.circleci/config.yml
Outdated
| machine: true | ||
| steps: | ||
| - checkout | ||
| - run: docker build -t emscripten-core/emsdk:$CIRCLE_BRANCH docker/ |
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.
We do have docker.io organization called emscripten/emsdk.
I don't know who manages this organisation, looks like @haraldreingruber has access to another project emscripten/emscripten-ci - maybe he knows more :)
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 seem to remember deciding on emscripten/emsdk for this image, right? Or am I remembering wrong?
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.
Most likely you're right. And looking at the name of this repo it makes sense.
In this case there should be a following action on https://hub.docker.com/orgs/emscripten
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.
The org (https://hub.docker.com/orgs/emscripten) was created by @kripken, right?
It's odd, but I don't see any other members...
@sbc100 It looks like whenever this file changes, emsdk is tagged. Could we instead make this job trigger on tags instead? That would be very straight forward to achieve. *edit: I implemented this suggestion now. Unsure whether this works, though, since CircleCI seems a bit confusing in this regard and the job has been triggered by my last push, despite not being a tag. |
1fbc527 to
648f665
Compare
648f665 to
fa7c2d9
Compare
|
From my side this is pretty much ready, what's left is:
So, this is ready to be merged from my side. |
fa7c2d9 to
2774148
Compare
|
@sbc100 I fixed or commented on the issues you found. Tell me if there is anything else I can do. |
|
lgtm. What are the next steps? It looks like the CI is currently failing... and I guess we need to figure out how to inject the credentials? |
|
Injecting the credentials should be done after merge by someone who has access to the Circle CI backend and the docker hub namespace (@kripken? See #513 (comment)). The CI is failing because it is not running for a tag, hence Also, I guess this needs to be run once for all the existing previous tags. Probably sufficient to do that manually. |
It seems a little odd to me that this would run on this PR at all.. if its only supposed to run on tags.. why is it running here? |
1705baa to
bff9fe3
Compare
Signed-off-by: Squareys <[email protected]>
bff9fe3 to
43b221d
Compare
Uh, I figured it out, it needed 2 more spaces of indentation... |
As per emscripten-core/emscripten#11078 and #372.
@trzecieu @sbc100
Very very rough draft for building the docker image on Circle CI.
TODO
tagsemscripten-releases-tags.txtchanges.Build various variations of the image? (i.e. I remember emscripten-slim and a ubuntu based version in trzeci's original images.)