Skip to content

Commit 96112b7

Browse files
committed
Add initial files
0 parents  commit 96112b7

File tree

3 files changed

+135
-0
lines changed

3 files changed

+135
-0
lines changed

Dockerfile

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
FROM buildpack-deps:wheezy
2+
3+
###
4+
# Build and install Python
5+
###
6+
7+
# remove several traces of debian python
8+
RUN apt-get purge -y python.*
9+
10+
# http://bugs.python.org/issue19846
11+
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
12+
ENV LANG C.UTF-8
13+
14+
# gpg: key 18ADD4FF: public key "Benjamin Peterson <benjamin@python.org>" imported
15+
ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF
16+
17+
ENV PYTHON_VERSION 2.7.12
18+
19+
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
20+
ENV PYTHON_PIP_VERSION 8.1.2
21+
22+
RUN set -ex \
23+
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \
24+
&& curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \
25+
&& export GNUPGHOME="$(mktemp -d)" \
26+
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
27+
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \
28+
&& rm -r "$GNUPGHOME" python.tar.xz.asc \
29+
&& mkdir -p /usr/src/python \
30+
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \
31+
&& rm python.tar.xz \
32+
\
33+
&& cd /usr/src/python \
34+
&& ./configure --enable-shared --enable-unicode=ucs4 \
35+
&& make -j$(nproc) \
36+
&& make install \
37+
&& ldconfig \
38+
&& curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \
39+
&& pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \
40+
&& find /usr/local -depth \
41+
\( \
42+
\( -type d -a -name test -o -name tests \) \
43+
-o \
44+
\( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
45+
\) -exec rm -rf '{}' + \
46+
&& rm -rf /usr/src/python ~/.cache
47+
48+
# install "virtualenv", since the vast majority of users of this image will want it
49+
RUN pip install --no-cache-dir virtualenv
50+
51+
###
52+
# Build and install Node.js
53+
###
54+
55+
# gpg keys listed at https://github.com/nodejs/node
56+
RUN set -ex \
57+
&& for key in \
58+
9554F04D7259F04124DE6B476D5A82AC7E37093B \
59+
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
60+
0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93 \
61+
FD3A5288F042B6850C66B31F09FE44734EB7990E \
62+
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
63+
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
64+
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
65+
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
66+
; do \
67+
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
68+
done
69+
70+
ENV NPM_CONFIG_LOGLEVEL info
71+
ENV NODE_VERSION 6.5.0
72+
73+
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
74+
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
75+
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
76+
&& grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
77+
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
78+
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt
79+
80+
###
81+
# This adds fs-extra to npm and replaces the fs.rename method with the fs.extra move method
82+
# that now automatic chooses what to do (rename/move)
83+
# https://github.com/npm/npm/issues/9863
84+
###
85+
86+
RUN cd $(npm root -g)/npm \
87+
&& npm install fs-extra \
88+
&& sed -i -e s/graceful-fs/fs-extra/ -e s/fs.rename/fs.move/ ./lib/utils/rename.js
89+
90+
###
91+
# Install build tools
92+
###
93+
94+
# Install packages
95+
RUN apt-get update -y -q && \
96+
apt-get install --no-install-recommends -y \
97+
zip unzip \
98+
&& rm -rf /var/lib/apt/lists/*
99+
100+
101+
###
102+
# Install boto3 globally
103+
###
104+
105+
RUN pip install boto3
106+
107+
###
108+
# Install Gulp and JSPM globally
109+
110+
RUN npm install gulp -g
111+
RUN npm install jspm -g

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MIT License
2+
3+
Copyright &copy; 2017, MakeTested LLC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Node-Python Docker Image
2+
3+
Based on https://bitbucket.org/byndops/bitbucket-node-python-docker

0 commit comments

Comments
 (0)