Skip to content

Commit 2542eef

Browse files
committed
Add generate stackbrew script like postgres and golang
1 parent 8107d3c commit 2542eef

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

2/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ RUN apt-get purge -y python python-minimal python2.7-minimal
77

88
RUN mkdir /usr/src/python
99
WORKDIR /usr/src/python
10-
RUN curl -SL https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz \
10+
11+
ENV PYTHON_VERSION 2.7.8
12+
13+
RUN curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
1114
| tar -xJ --strip-components=1
1215
# skip "test_file2k" thanks to "AssertionError: IOError not raised"
1316
# skip "test_mhlib" because it fails on the hub in "test_listfolders" with "AssertionError: Lists differ: [] != ['deep', 'deep/f1', 'deep/f2',..."

3/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ RUN apt-get purge -y python python-minimal python2.7-minimal
77

88
RUN mkdir /usr/src/python
99
WORKDIR /usr/src/python
10-
RUN curl -SL https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tar.xz \
10+
11+
ENV PYTHON_VERSION 3.4.1
12+
13+
RUN curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
1114
| tar -xJ --strip-components=1
1215
# skip "test_shutil" thanks to "PermissionError: [Errno 1] Operation not permitted" trying to set xattrs
1316
RUN ./configure \

generate-stackbrew-library.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
set -e
3+
4+
declare -A aliases
5+
aliases=(
6+
[3]='latest'
7+
)
8+
9+
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
10+
11+
versions=( */ )
12+
versions=( "${versions[@]%/}" )
13+
url='git://github.com/docker-library/docker-python'
14+
15+
echo '# maintainer: InfoSiftr <github@infosiftr.com> (@infosiftr)'
16+
17+
for version in "${versions[@]}"; do
18+
commit="$(git log -1 --format='format:%H' "$version")"
19+
fullVersion="$(grep -m1 'ENV PYTHON_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)"
20+
majorVersion="$(echo "$fullVersion" | cut -d. -f1-2)"
21+
versionAliases=( $fullVersion $majorVersion $version ${aliases[$version]} )
22+
23+
echo
24+
for va in "${versionAliases[@]}"; do
25+
echo "$va: ${url}@${commit} $version"
26+
done
27+
done

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy