-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add dockerfile #7
base: master
Are you sure you want to change the base?
Conversation
It helps to build locally (especially by using our mesosbuild image to get faster feedback) A future commit will use this to have a CI in travis Change-Id: I38ba55806403b42add113f9ccd90aec1b0fbe56d
ENV CXXFLAGS="-isystem $MESOS_BUILD_DIR/3rdparty/protobuf-*/src -isystem $MESOS_BUILD_DIR/3rdparty/glog-*/src -isystem $MESOS_BUILD_DIR/3rdparty/boost-*[0-9] -isystem $CONTAINER_LOGGER_DIR/mesos-install/usr/include -isystem $CONTAINER_LOGGER_DIR/mesos-install/usr/lib64/mesos/3rdparty/usr/include" | ||
RUN cmake3 -DWITH_MESOS=$CONTAINER_LOGGER_DIR/mesos-install/usr/local/ -DMESOS_SRC_DIR=$CONTAINER_LOGGER_DIR/mesos .. | ||
RUN make -j 3 |
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.
Shouldn't we favor an image with just the tools and mesos lib/sources, and using it to build with docker run + volume? I think the later approach is more suited to iterative development.
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 agree, we don't care about the generated image in this case, we only need the .so. Having Container logger dir as a volume will avoid having to rebuild the image every time.
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'm not sure to understand the suggestion, could you detail?
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.
Instead of ADD use VOLUME, instead of the last two RUN use CMD that way we can build an image that is independent from the code of the container logger. Then when we want to build the .so we would do something like docker build . -t container-logger-build && docker run container-logger-build -v $(pwd):/src/mesos-external-container-logger
It helps to build locally (especially by using our mesosbuild image to
get faster feedback)
A future commit will use this to have a CI in travis
Change-Id: I38ba55806403b42add113f9ccd90aec1b0fbe56d