mirror of
https://github.com/maptiler/tileserver-gl.git
synced 2024-11-28 05:13:04 +03:00
c134795b81
* change docker to use default 8080 port
36 lines
904 B
Plaintext
36 lines
904 B
Plaintext
FROM ubuntu:focal
|
|
|
|
ENV \
|
|
NODE_ENV="production" \
|
|
CHOKIDAR_USEPOLLING=1 \
|
|
CHOKIDAR_INTERVAL=500
|
|
|
|
RUN set -ex; \
|
|
export DEBIAN_FRONTEND=noninteractive; \
|
|
groupadd -r node; \
|
|
useradd -r -g node node; \
|
|
apt-get -qq update; \
|
|
apt-get -y --no-install-recommends install \
|
|
ca-certificates \
|
|
wget; \
|
|
wget -qO- https://deb.nodesource.com/setup_16.x | bash; \
|
|
apt-get install -y nodejs; \
|
|
apt-get -y remove wget; \
|
|
apt-get -y --purge autoremove; \
|
|
apt-get clean; \
|
|
rm -rf /var/lib/apt/lists/*;
|
|
|
|
EXPOSE 8080
|
|
|
|
RUN mkdir -p /data && chown node:node /data
|
|
VOLUME /data
|
|
WORKDIR /data
|
|
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]
|
|
|
|
RUN mkdir -p /usr/src/app
|
|
COPY / /usr/src/app
|
|
RUN cd /usr/src/app && npm install --omit=dev
|
|
RUN ["chmod", "+x", "/usr/src/app/docker-entrypoint.sh"]
|
|
USER node:node
|
|
HEALTHCHECK CMD node /usr/src/app/src/healthcheck.js
|