diff --git a/2/Dockerfile b/2.7/Dockerfile similarity index 100% rename from 2/Dockerfile rename to 2.7/Dockerfile diff --git a/2/onbuild/Dockerfile b/2.7/onbuild/Dockerfile similarity index 100% rename from 2/onbuild/Dockerfile rename to 2.7/onbuild/Dockerfile diff --git a/3.3/Dockerfile b/3.3/Dockerfile new file mode 100644 index 000000000..2b4a4c3da --- /dev/null +++ b/3.3/Dockerfile @@ -0,0 +1,29 @@ +FROM buildpack-deps + +RUN apt-get update && apt-get install -y curl procps + +# remove several traces of debian python +RUN apt-get purge -y python python-minimal python2.7-minimal + +RUN mkdir /usr/src/python +WORKDIR /usr/src/python + +ENV PYTHON_VERSION 3.3.5 + +RUN curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \ + | tar -xJ --strip-components=1 +RUN ./configure \ + && make -j$(nproc) \ + && make install \ + && make clean + +# make some useful symlinks that are expected to exist +RUN cd /usr/local/bin \ + && ln -s easy_install-3.4 easy_install \ + && ln -s idle3 idle \ + && ln -s pip3 pip \ + && ln -s pydoc3 pydoc \ + && ln -s python3 python \ + && ln -s python-config3 python-config + +CMD ["python3"] diff --git a/3.3/onbuild/Dockerfile b/3.3/onbuild/Dockerfile new file mode 100644 index 000000000..5608182b1 --- /dev/null +++ b/3.3/onbuild/Dockerfile @@ -0,0 +1,9 @@ +FROM python:3.3.5 + +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +ONBUILD COPY requirements.txt /usr/src/app/ +ONBUILD RUN pip install -r requirements.txt + +ONBUILD COPY . /usr/src/app diff --git a/3/Dockerfile b/3.4/Dockerfile similarity index 100% rename from 3/Dockerfile rename to 3.4/Dockerfile diff --git a/3/onbuild/Dockerfile b/3.4/onbuild/Dockerfile similarity index 100% rename from 3/onbuild/Dockerfile rename to 3.4/onbuild/Dockerfile diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index c17991b27..d7f428a4c 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -3,7 +3,8 @@ set -e declare -A aliases aliases=( - [3]='latest' + [3.4]='3 latest' + [2.7]='2' ) cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" @@ -17,8 +18,7 @@ echo '# maintainer: InfoSiftr (@infosiftr)' for version in "${versions[@]}"; do commit="$(git log -1 --format='format:%H' "$version")" fullVersion="$(grep -m1 'ENV PYTHON_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)" - majorVersion="$(echo "$fullVersion" | cut -d. -f1-2)" - versionAliases=( $fullVersion $majorVersion $version ${aliases[$version]} ) + versionAliases=( $fullVersion $version ${aliases[$version]} ) echo for va in "${versionAliases[@]}"; do