Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add dockerfile #7

wants to merge 1 commit into from

Conversation

kamaradclimber
Copy link
Contributor

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

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
@kamaradclimber kamaradclimber requested a review from a team March 10, 2020 08:58
Comment on lines +16 to +18
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
Copy link

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.

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.

Copy link
Contributor Author

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?

Copy link

@St0rmingBr4in St0rmingBr4in Mar 10, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants