-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
27 lines (24 loc) · 880 Bytes
/
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
# This doesn't work because `node:6` is based on Debian 8 which
# doesn't have a recent enough version of libstdc++5-dev, we need
# node6 for other features though and in order for mapnik to work on
# node6 we need the recent C++.
#FROM node:6
FROM ubuntu:focal
RUN apt-get update; DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" apt-get install -y tzdata wget build-essential python
#RUN wget -O /tmp/nodesource_setup.sh https://deb.nodesource.com/setup_6.x; bash /tmp/nodesource_setup.sh
RUN apt-get install -y nodejs npm
RUN npm install -g n
RUN n 10.24.1
RUN npm install -g yarn
RUN mkdir -p /var/www; chown www-data:www-data /var/www
USER www-data
WORKDIR /var/www
ADD package.json /var/www/package.json
RUN npm install mapnik@4.0.0
RUN npm install
RUN yarn install; yarn cache clean
ADD . /var/www
RUN yarn build
RUN npm install
EXPOSE 19196
CMD ["npm", "start"]