-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
60 lines (50 loc) · 2.71 KB
/
Dockerfile.dev
File metadata and controls
60 lines (50 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM jarokelo/php-nginx:php71
# Disabling IPv6 for GPG later. https://github.com/inversepath/usbarmory-debian-base_image/issues/9#issuecomment-451635505
RUN mkdir -p ~/.gnupg && \
echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf
# install curl to download nodejs
# install git, composer and npm needs it
# install bzip2, npm needs it
# install ssh and rsync for deployment
RUN apt-get update \
&& apt-get install -y curl git gpg dirmngr bzip2 openssh-client rsync --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# install node, script from official node docker image, modified to use gz
# gpg keys listed at https://github.com/nodejs/node
# Do DNS lookup before gpg. https://github.com/inversepath/usbarmory-debian-base_image/issues/9#issuecomment-502449504
RUN set -ex \
&& ping -c 10 pool.sks-keyservers.net \
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
B9E2F5981AA6E0CD28160D9FF13993A75599653C \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
77984A986EBC2AA786BC0F66B01FBB92821C587A \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
FD3A5288F042B6850C66B31F09FE44734EB7990E \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \
; do \
gpg --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys "$key"; \
done
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 6.12.0
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-x64.tar.gz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-x64.tar.gz" SHASUMS256.txt.asc SHASUMS256.txt
RUN mkdir -p /tmp/nodetemp && cd /tmp/nodetemp && \
npm install npm && \
rm -rf /usr/local/lib/node_modules/npm && \
mv node_modules/npm /usr/local/lib/node_modules/npm
RUN npm install -g yarn
# install composer
RUN php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php \
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('https://composer.github.io/installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& php -r "unlink('composer-setup.php');"
ADD php_cli_dev.ini /etc/php/7.1/cli/conf.d/php_cli_dev.ini