1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-29 18:21:24 +00:00
dockerfiles/owntracks/ot-frontend/Dockerfile

28 lines
672 B
Docker
Raw Permalink Normal View History

2019-10-15 01:23:44 +00:00
#
# Dockerfile for ot-frontend-arm
#
2022-02-21 08:20:00 +00:00
FROM node:14 AS build
2020-09-15 11:06:47 +00: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 01:23:44 +00:00
2022-02-21 08:20:00 +00:00
FROM nginx:alpine
2020-09-15 11:06:47 +00:00
MAINTAINER EasyPi Software Foundation
2019-10-15 01:23:44 +00:00
2020-09-15 11:06:47 +00: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 01:23:44 +00:00
ENV LISTEN_PORT=80
ENV SERVER_HOST=otrecorder
ENV SERVER_PORT=8083
EXPOSE 80
CMD set -xe \
2020-09-15 11:06:47 +00:00
&& envsubst '${LISTEN_PORT}:${SERVER_HOST}:${SERVER_PORT}' < /etc/nginx/nginx.tmpl > /etc/nginx/nginx.conf \
2019-10-15 01:26:07 +00:00
&& mkdir -p /run/nginx/ \
2019-10-15 01:23:44 +00:00
&& nginx -g 'daemon off;'