1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/owntracks/ot-frontend/Dockerfile

28 lines
672 B
Docker
Raw Normal View History

2019-10-15 03:23:44 +02:00
#
# Dockerfile for ot-frontend-arm
#
2022-02-21 10:20:00 +02:00
FROM node:14 AS build
2020-09-15 13:06:47 +02:00
WORKDIR /usr/src/app
RUN curl -sSL https://github.com/owntracks/frontend/archive/master.tar.gz | tar xz --strip-components=1
RUN yarn install
RUN yarn build
2019-10-15 03:23:44 +02:00
2022-02-21 10:20:00 +02:00
FROM nginx:alpine
2020-09-15 13:06:47 +02:00
MAINTAINER EasyPi Software Foundation
2019-10-15 03:23:44 +02:00
2020-09-15 13:06:47 +02:00
COPY --from=build /usr/src/app/dist /usr/share/nginx/html
COPY --from=build /usr/src/app/docker/nginx.tmpl /etc/nginx/nginx.tmpl
2019-10-15 03:23:44 +02:00
ENV LISTEN_PORT=80
ENV SERVER_HOST=otrecorder
ENV SERVER_PORT=8083
EXPOSE 80
CMD set -xe \
2020-09-15 13:06:47 +02:00
&& envsubst '${LISTEN_PORT}:${SERVER_HOST}:${SERVER_PORT}' < /etc/nginx/nginx.tmpl > /etc/nginx/nginx.conf \
2019-10-15 03:26:07 +02:00
&& mkdir -p /run/nginx/ \
2019-10-15 03:23:44 +02:00
&& nginx -g 'daemon off;'