Skip to content

Add slim variants #24

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

Merged
merged 1 commit into from
Nov 26, 2014
Merged

Add slim variants #24

merged 1 commit into from
Nov 26, 2014

Conversation

tianon
Copy link
Member

@tianon tianon commented Nov 26, 2014

Fixes #16

@tianon
Copy link
Member Author

tianon commented Nov 26, 2014

diff --git a/2.7/Dockerfile b/2.7/slim/Dockerfile
index d71d25b..71a27de 100644
--- a/2.7/Dockerfile
+++ b/2.7/slim/Dockerfile
@@ -1,4 +1,4 @@
-FROM buildpack-deps:jessie
+FROM debian:jessie

 # remove several traces of debian python
 RUN apt-get purge -y python.*
@@ -7,9 +7,13 @@ RUN apt-get purge -y python.*
 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
 ENV LANG C.UTF-8

+RUN apt-get update && apt-get install -y ca-certificates libssl1.0.0 --no-install-recommends && rm -rf /var/lib/apt/lists/*
+
 ENV PYTHON_VERSION 2.7.8

 RUN set -x \
+   && buildDeps='curl gcc libc6-dev libssl-dev make xz-utils zlib1g-dev' \
+   && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
    && mkdir -p /usr/src/python \
    && curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
        | tar -xJC /usr/src/python --strip-components=1 \
@@ -23,6 +27,7 @@ RUN set -x \
        \( -type d -a -name test -o -name tests \) \
        -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
        -exec rm -rf '{}' + \
+   && apt-get purge -y --auto-remove $buildDeps \
    && rm -rf /usr/src/python

 # install "virtualenv", since the vast majority of users of this image will want it
diff --git a/3.3/Dockerfile b/3.3/slim/Dockerfile
index 77e8c42..6b45021 100644
--- a/3.3/Dockerfile
+++ b/3.3/slim/Dockerfile
@@ -1,4 +1,4 @@
-FROM buildpack-deps:jessie
+FROM debian:jessie

 # remove several traces of debian python
 RUN apt-get purge -y python.*
@@ -7,9 +7,13 @@ RUN apt-get purge -y python.*
 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
 ENV LANG C.UTF-8

+RUN apt-get update && apt-get install -y ca-certificates libssl1.0.0 --no-install-recommends && rm -rf /var/lib/apt/lists/*
+
 ENV PYTHON_VERSION 3.3.6

 RUN set -x \
+   && buildDeps='curl gcc libc6-dev libssl-dev make xz-utils zlib1g-dev' \
+   && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
    && mkdir -p /usr/src/python \
    && curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
        | tar -xJC /usr/src/python --strip-components=1 \
@@ -23,6 +27,7 @@ RUN set -x \
        \( -type d -a -name test -o -name tests \) \
        -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
        -exec rm -rf '{}' + \
+   && apt-get purge -y --auto-remove $buildDeps \
    && rm -rf /usr/src/python

 # make some useful symlinks that are expected to exist
diff --git a/3.4/Dockerfile b/3.4/slim/Dockerfile
index f9a4560..4fd7462 100644
--- a/3.4/Dockerfile
+++ b/3.4/slim/Dockerfile
@@ -1,4 +1,4 @@
-FROM buildpack-deps:jessie
+FROM debian:jessie

 # remove several traces of debian python
 RUN apt-get purge -y python.*
@@ -7,9 +7,13 @@ RUN apt-get purge -y python.*
 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
 ENV LANG C.UTF-8

+RUN apt-get update && apt-get install -y ca-certificates libssl1.0.0 --no-install-recommends && rm -rf /var/lib/apt/lists/*
+
 ENV PYTHON_VERSION 3.4.2

 RUN set -x \
+   && buildDeps='curl gcc libc6-dev libssl-dev make xz-utils zlib1g-dev' \
+   && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
    && mkdir -p /usr/src/python \
    && curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
        | tar -xJC /usr/src/python --strip-components=1 \
@@ -22,6 +26,7 @@ RUN set -x \
        \( -type d -a -name test -o -name tests \) \
        -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
        -exec rm -rf '{}' + \
+   && apt-get purge -y --auto-remove $buildDeps \
    && rm -rf /usr/src/python

 # make some useful symlinks that are expected to exist

@yosifkit
Copy link
Member

LGTM

yosifkit added a commit that referenced this pull request Nov 26, 2014
@yosifkit yosifkit merged commit db08f8d into docker-library:master Nov 26, 2014
@yosifkit yosifkit deleted the slim branch November 26, 2014 18:39
tianon added a commit to infosiftr/stackbrew that referenced this pull request Nov 26, 2014
- `docker-dev`: `1.3.2`
- `golang`: support for Go 1.4 "Custom Import Paths" (docker-library/golang#32)
- `python`: smaller and `--enable-shared` (docker-library/python#23); slim variants (docker-library/python#24)
- `tomcat`: jre8 versions (docker-library/tomcat#5)
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.

"python:slim"
2 participants