Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Adding the ARG feature to build with any user for juju-1 #20
Conversation
mbruzek
added some commits
Nov 17, 2016
| + | ||
| +VOLUME [ "$JUJU_HOME", "$JUJU_REPOSITORY" ] | ||
| + | ||
| +ADD setup.sh /setup.sh |
kwmonroe
Nov 17, 2016
Member
any reason you went with ADD over COPY here? docker docs say COPY is preferred if you're not relying on ADD auto extraction capabilities:
https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/add-or-copy
| -# The directory to look for charms. | ||
| -export JUJU_REPOSITORY=${HOME} | ||
| -# The path to Juju configuration files. | ||
| -export JUJU_HOME=${HOME}/.juju |
kwmonroe
Nov 17, 2016
Member
why remove these exports from the user's .bashrc? they seem handy to have set for anyone entering the jujubox.
kwmonroe
Nov 17, 2016
Member
oh, i see in master that these aren't set in the .bashrc either.. do ENV doohickeys persist when the image is run? if so, i see why these .bashrc additions aren't needed.
chuckbutler
Nov 28, 2016
Contributor
Yeah, ENV exports persist unless you run sudo, in which point anything in the env was going to be stripped anyway.
kwmonroe
referenced this pull request
Nov 17, 2016
Merged
Adding ARG to optionally build with any user for master. #21
mbruzek
changed the title from
Adding the ARG feature to build with any user.
to
Adding the ARG feature to build with any user for juju-1
Nov 18, 2016
kwmonroe
referenced this pull request
in juju-solutions/charmbox
Nov 21, 2016
Merged
Reconcile with jujubox #66
|
Requested change committed, please re-review. |
chuckbutler
approved these changes
Nov 28, 2016
I had one minor comment. the rest of this looks good to me.
I validated the build routine as follows:
docker build --build-arg JUJU_USER=foobar -t jujubox-1 .
everything appears to be in order here. Just a minor nit about the juju-1 bin naming and you have no control over that. Maybe we could symlink it for the user so its transparent? is that a bad idea?
| + | ||
| +# Set a welcome message in .bashrc with the exact version of Juju. | ||
| +RC=/home/$JUJU_USER/.bashrc | ||
| +echo "echo Welcome to jujubox version ${JUJU_VERSION}" >> $RC |
chuckbutler
Nov 28, 2016
Contributor
It might still be prudent to include information about how to run juju1
the binary has changed to juju-1, i was surprised when i fired up the assembled container, typed in juju and it responded with command not found :|
lameee
mbruzek
Nov 28, 2016
Contributor
Thanks for review. I thought about using a symlink, but I don't want to step on the packaging if they ever were to fix that.
mbruzek commentedNov 17, 2016
Just trying to keep this juju-1 branch fresh