Skip to content
This repository has been archived by the owner on Jun 22, 2018. It is now read-only.

Copy minimesosFile into the minimesos-cli container #547

Merged
merged 1 commit into from
Mar 20, 2018

Conversation

EarlGray
Copy link
Contributor

Previously, the minimesos-cli container relied on minimesosFile present
in the host's $MINIMESOS_HOST_DIR mounted inside the container. This works
for a local docker daemon, but fails with remote docker daemons (e.g.
docker-machine), because $DOCKER_CONTAINER:$MINIMESOS_HOST_DIR/minimesosFile
is a fresh directory if it does not exist in the [remote] host file system.

Now minimesosFile is copied into $DOCKER_CONTAINER:/minimesosFile and
minimesos-cli is configured with a new system property that points to this
location.

This should fix #546

Previously, the `minimesos-cli` container relied on `minimesosFile` present
in the host's $MINIMESOS_HOST_DIR mounted inside the container. This works
for a local docker daemon, but fails with remote docker daemons (e.g.
docker-machine), because $DOCKER_CONTAINER:$MINIMESOS_HOST_DIR/minimesosFile
is a fresh directory if it does not exist in the [remote] host file system.

Now `minimesosFile` is copied into $DOCKER_CONTAINER:/minimesosFile and
minimesos-cli is configured with a new system property that points to this
location.

This should fix ContainerSolutions#546
@EarlGray
Copy link
Contributor Author

I hope that fixes #538 too.

@frankscholten
Copy link
Contributor

@EarlGray I tried building your branch with

./gradlew buildDockerImage

but I got the following error:

:cli:buildDockerImage FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':cli:buildDockerImage'.
> java.lang.reflect.InvocationTargetException-->null


@EarlGray
Copy link
Contributor Author

I was able to reproduce the build error on Mac (on my branch and on the upstream master too). You can disregard it for checking my changes: if you have Docker for Mac running, the minimesos-cli docker image is actually built and runs successfully via bin/minimesos.

@frankscholten
Copy link
Contributor

frankscholten commented Mar 20, 2018

LGTM

Approved with PullApprove

@frankscholten frankscholten merged commit e780ab6 into ContainerSolutions:master Mar 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

minimesosFile ignored when using non-local DOCKER_HOST
2 participants