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

I1308 docker base image for release #1320

Merged
merged 8 commits into from
Jul 31, 2018

Conversation

laneb
Copy link
Contributor

@laneb laneb commented Jul 26, 2018

Resolves #1308.

@jacobdr Please have a look tomorrow if you have time.

The goal of this PR is to reduce the complexity of smv-release.

  1. Created a multi-stage docker build. First stage installs dev dependencies and generates the release artifacts. Second stage install prod dependencies and unpacks the release artifact.
  2. Created make targets to create both docker images, extract the release artifact from the first, and build docs
  3. Updated smv-release to leverage these make targets

RUN echo "deb http://cran.rstudio.com/bin/linux/debian lenny-cran/" >> /etc/apt/source.list &&\
apt-key adv --keyserver hkp://pgp.mit.edu --recv-key 381BA480 &&\
apt-get update &&\
apt-get install -y r-base &&\
apt-get install -y unzip &&\
apt-get install -y r-base &&\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we are removing this. Or is that a separate issue?

Copy link
Contributor Author

@laneb laneb Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1316 for removing R


COPY --from=smv-build ${PYENV_ROOT} ${PYENV_ROOT}
COPY --from=smv-build /usr/lib/SMV/smv_*.tgz .
RUN tar xzvf smv_*.tgz && rm -rf smv_*.tgz && mv ./SMV ${SMV_HOME} &&\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block really needs a comment to explain what is going on and why.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a header comment to describe the multi-stage pattern and some inline comments explaining the copies from first to second stage.

py-doc: $(PYDOC_DEST)

$(PYDOC_DEST): install-spark-default
env SMV_VERSION=$(SMV_VERSION) \
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 doubt using env is the best solution to the problem of exporting env variables to sphinx. It was the first I got to work. Need to at least dry out this approach since it is c/p'd a few lines down.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually env is the "unixish" way. That is the whole purpose of env existence 😄

COPY --from=smv-build ${PYENV_ROOT} ${PYENV_ROOT}
# Copy the SMV release artifact from the first stage and unpack it. Since the same artifact is also copied
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

py-doc: $(PYDOC_DEST)

$(PYDOC_DEST): install-spark-default
env SMV_VERSION=$(SMV_VERSION) \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually env is the "unixish" way. That is the whole purpose of env existence 😄

Copy link
Contributor

@AliTajeldin AliTajeldin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome.

@AliTajeldin AliTajeldin merged commit 187ddd1 into master Jul 31, 2018
@AliTajeldin AliTajeldin deleted the i1308_docker_base_image_for_release branch July 31, 2018 01:34
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.

2 participants