-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
75 lines (60 loc) · 2.72 KB
/
Dockerfile
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
FROM abihf/osm2pgsql
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 6.10.1
ENV VERSION=v6.10.1 NPM_VERSION=3
ENV CONFIG_FLAGS="--fully-static --without-npm" DEL_PKGS="libstdc++" RM_DIRS=/usr/include
RUN adduser -D -u 1000 node && \
apk update && apk upgrade &&\
apk add --no-cache --virtual .build-deps \
tar xz curl make gcc g++ python linux-headers binutils-gold gnupg libstdc++ && \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
FD3A5288F042B6850C66B31F09FE44734EB7990E \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
56730D5401028683275BD23C23EFEFE93C4CFFFE
RUN curl -sSLO https://nodejs.org/dist/${VERSION}/node-${VERSION}.tar.xz && \
curl -sSL https://nodejs.org/dist/${VERSION}/SHASUMS256.txt.asc | gpg --batch --decrypt | \
grep " node-${VERSION}.tar.xz\$" | sha256sum -c | grep . && \
tar -xf node-${VERSION}.tar.xz && \
cd node-${VERSION} && \
./configure --prefix=/usr ${CONFIG_FLAGS} && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install && \
cd / && \
if [ -x /usr/bin/npm ]; then \
npm install -g npm@${NPM_VERSION} && \
find /usr/lib/node_modules/npm -name test -o -name .bin -type d | xargs rm -rf; \
fi && \
apk del curl make gcc g++ python linux-headers binutils-gold gnupg ${DEL_PKGS} && \
rm -rf ${RM_DIRS} /node-${VERSION}* /usr/share/man /tmp/* /var/cache/apk/* \
/root/.npm /root/.node-gyp /root/.gnupg /usr/lib/node_modules/npm/man \
/usr/lib/node_modules/npm/doc /usr/lib/node_modules/npm/html /usr/lib/node_modules/npm/scripts
ENV YARN_VERSION 0.21.3
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg \
&& for key in \
6A010C5166006599AA17F08146C2130DFD2497F5 \
; do \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
done \
&& curl -fSL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \
&& curl -fSL -o yarn.js.asc "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js.asc" \
&& gpg --batch --verify yarn.js.asc yarn.js \
&& rm yarn.js.asc \
&& mv yarn.js /usr/local/bin/yarn \
&& chmod +x /usr/local/bin/yarn \
&& apk del .build-deps-yarn
RUN mkdir -p /opt/map-loader
COPY *.json /opt/map-loader/
RUN node --version
RUN cd /opt/map-loader; yarn install
WORKDIR /opt/map-loader
COPY *.ts /opt/map-loader/
COPY map-loader.sh /opt/map-loader/map-loader.sh
COPY splash.txt /opt/map-loader/splash.txt
RUN chmod +x /opt/map-loader/map-loader.sh
CMD "/opt/map-loader/map-loader.sh"
RUN ln -s /opt/map-loader/map-loader.sh /usr/bin/map-loader
ENTRYPOINT ["map-loader"]