-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
3.x shrink image #8856
Closed
Closed
3.x shrink image #8856
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d20ddb8
Removes redundant locales-generation in Docker image
funkyfuture 52cc36c
Reduces apt's overhead in Docker image
funkyfuture 6f99cb9
Removes pip's and npm's caches from Docker image
funkyfuture 6f5a63d
Installs Sphinx from PyPI in Docker image
funkyfuture 9d8f849
Reduces layers of Docker image
funkyfuture bea63a3
Removes build-dependencies after installation in Dockerfile
funkyfuture b256f72
Removes Sphinx & invoke from Dockerfile
funkyfuture 5783986
Changes source location to /ipython in Docker image
funkyfuture 8a5d644
Adds a .dockerignore
funkyfuture File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.git | ||
.git* | ||
.mailmap | ||
.travis.yml | ||
IPython/html/static/components/.git | ||
IPython/html/static/components/.gitignore | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,66 @@ | ||
# Installs IPython from the current branch | ||
# Another Docker container should build from this one to get services like the notebook | ||
# Other Docker images should build from this one to get services like the notebook | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment is way out of date now that |
||
|
||
FROM ubuntu:14.04 | ||
|
||
MAINTAINER IPython Project <ipython-dev@scipy.org> | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Not essential, but wise to set the lang | ||
# Note: Users with other languages should set this in their derivative image | ||
RUN apt-get update && apt-get install -y language-pack-en | ||
ENV LANGUAGE en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
RUN locale-gen en_US.UTF-8 | ||
RUN dpkg-reconfigure locales | ||
|
||
# Python binary dependencies, developer tools | ||
RUN apt-get update && apt-get install -y -q \ | ||
build-essential \ | ||
curl \ | ||
make \ | ||
gcc \ | ||
zlib1g-dev \ | ||
git \ | ||
python \ | ||
python-dev \ | ||
python3-dev \ | ||
python-sphinx \ | ||
python3-sphinx \ | ||
libzmq3-dev \ | ||
sqlite3 \ | ||
libsqlite3-dev \ | ||
pandoc \ | ||
libcurl4-openssl-dev \ | ||
nodejs \ | ||
nodejs-legacy \ | ||
npm | ||
|
||
# Install the recent pip release | ||
RUN curl -O https://bootstrap.pypa.io/get-pip.py \ | ||
RUN apt-get update -qq \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
git \ | ||
language-pack-en \ | ||
libcurl4-openssl-dev \ | ||
libsqlite3-dev \ | ||
libzmq3-dev \ | ||
pandoc \ | ||
python \ | ||
python-dev \ | ||
python3-dev \ | ||
sqlite3 \ | ||
zlib1g-dev \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
\ | ||
`# Install the recent pip release` \ | ||
&& curl -O https://bootstrap.pypa.io/get-pip.py \ | ||
&& python2 get-pip.py \ | ||
&& python3 get-pip.py \ | ||
&& rm get-pip.py | ||
|
||
# In order to build from source, need less | ||
RUN npm install -g 'less@<3.0' | ||
|
||
RUN pip install invoke | ||
|
||
RUN mkdir -p /srv/ | ||
WORKDIR /srv/ | ||
ADD . /srv/ipython | ||
WORKDIR /srv/ipython/ | ||
RUN chmod -R +rX /srv/ipython | ||
|
||
# .[all] only works with -e, so use file://path#egg | ||
# Can't use -e because ipython2 and ipython3 will clobber each other | ||
RUN pip2 install file:///srv/ipython#egg=ipython[all] | ||
RUN pip3 install file:///srv/ipython#egg=ipython[all] | ||
|
||
# install kernels | ||
RUN python2 -m IPython kernelspec install-self | ||
RUN python3 -m IPython kernelspec install-self | ||
# Install IPython | ||
ADD . /ipython | ||
RUN chmod -R +rX /ipython \ | ||
\ | ||
`# Install build dependencies` \ | ||
&& BUILD_DEPS="nodejs nodejs-legacy npm" \ | ||
&& apt-get update -qq \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends $BUILD_DEPS \ | ||
&& npm install -g 'less@<3.0' \ | ||
\ | ||
`# .[all] only works with -e, so use file://path#egg` \ | ||
`# Cant use -e because ipython2 and ipython3 will clobber each other` \ | ||
&& pip2 install --no-cache-dir file:///ipython#egg=ipython[all] \ | ||
&& pip3 install --no-cache-dir file:///ipython#egg=ipython[all] \ | ||
\ | ||
`# Uninstall build dependencies` \ | ||
&& npm remove -g less \ | ||
&& npm cache clean \ | ||
&& apt-get purge -y --auto-remove \ | ||
-o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $BUILD_DEPS \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
\ | ||
`# install kernels` \ | ||
&& python2 -m IPython kernelspec install-self \ | ||
&& python3 -m IPython kernelspec install-self \ | ||
&& iptest2 && iptest3 | ||
|
||
WORKDIR /tmp/ | ||
|
||
RUN iptest2 | ||
RUN iptest3 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These are certainly a good idea to dockerignore.