bday2020/ui/docker/Dockerfile

29 lines
559 B
Docker
Raw Normal View History

2020-09-04 23:47:48 +00:00
FROM node:lts-alpine
LABEL maintainer="joern-michael.miehe@lenaisten.de"
2020-09-07 13:29:02 +00:00
# vue services directory
2020-09-04 23:47:48 +00:00
WORKDIR /srv/vue
2020-09-07 13:29:02 +00:00
# install vue cli
2020-09-04 23:47:48 +00:00
RUN set -ex; \
yarn global add @vue/cli
2020-09-07 13:29:02 +00:00
# user setup
ARG NONROOT_UID=1000
ARG NONROOT_GID=1000
# recycle node user
RUN set -ex; \
deluser --remove-home node; \
addgroup -g ${NONROOT_GID} node; \
adduser --disabled-password --gecos '' --uid "${NONROOT_UID}" --ingroup node node
# user change
2020-09-04 23:47:48 +00:00
USER node
2020-09-07 13:29:02 +00:00
# persistent home directory
2020-09-04 23:47:48 +00:00
VOLUME [ "/home/node" ]
2020-09-07 13:29:02 +00:00
# run vue ui
2020-09-04 23:47:48 +00:00
CMD [ "vue", "ui", "-H", "0.0.0.0" ]