Build docker image on Circle CI#513
Conversation
sbc100
left a comment
There was a problem hiding this comment.
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.
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.
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.
Pattern from the CircleCI docs, seems fine
There was a problem hiding this comment.
Looks odd, but also I've found that the recommended - more secure way for login.
There was a problem hiding this comment.
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.
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.
I seem to remember deciding on emscripten/emsdk for this image, right? Or am I remembering wrong?
There was a problem hiding this comment.
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.
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.)