-
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
Pull image by default, if not build #40
base: master
Are you sure you want to change the base?
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.
I didn't pay attention to this behavior before. Nice catch! The update is simple and seems correct! I only have some questions.
The docs are a bit confusing to me. From the compose-spec:
image
If the image does not exist on the platform, Compose implementations MUST attempt to pull it based on the pull_policy. Compose implementations with build support MAY offer alternative options for the end user to control precedence of pull over building the image from source, however pulling the image MUST be the default behavior.
It sounds there is a way to "control the precedence of pull over building", but it is not clear how to do that. Did you try to tweak the yaml file (maybe pull_policy
)?
@@ -50,7 +50,11 @@ fi | |||
ROS_DISTRO=$ROS_DISTRO \ | |||
VOLUMES_FOLDER=$VOLUMES_FOLDER \ | |||
CONTAINER_NAME=$CONTAINER_NAME \ | |||
docker-compose -p "$ROS_DISTRO" --env-file .env up $BUILD_IMAGE_OPT -d devel | |||
docker-compose -p "$ROS_DISTRO" --env-file .env $BUILD_IMAGE_OPT devel |
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.
How does it behave on calling it for the second time?
docker-compose -p "$ROS_DISTRO" --env-file .env $BUILD_IMAGE_OPT devel | ||
ROS_DISTRO=$ROS_DISTRO \ | ||
VOLUMES_FOLDER=$VOLUMES_FOLDER \ | ||
CONTAINER_NAME=$CONTAINER_NAME \ | ||
docker-compose -p "$ROS_DISTRO" --env-file .env up -d devel |
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 just want to ask you to check if you have problems running two containers of different distros simultaneously (the -p option is intended to solve this, but I don't know how it behaves by setting it on separate build
/pull
and up
steps)
No, you are right, this should be the right place to fix it, I will look into it |
Description
--build
, if not existent the image will be built by default. The idea is to pull instead of buildRelated Issues:
--build
option #39