AzuraCast/frontend/Dockerfile

36 lines
943 B
Docker
Raw Normal View History

FROM library/node:18-alpine
RUN apk update \
2021-09-15 21:13:00 +02:00
&& apk add bash python3 make curl g++ shadow git
RUN groupdel dialout
RUN mkdir -p /data/frontend/node_modules /data/translations /data/web/static \
&& chown -R node:node /data
2021-08-05 08:31:51 +02:00
RUN USER=node && \
GROUP=node && \
curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.5.1/fixuid-0.5.1-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - && \
chown root:root /usr/local/bin/fixuid && \
chmod 4755 /usr/local/bin/fixuid && \
mkdir -p /etc/fixuid && \
printf "user: $USER\ngroup: $GROUP\npaths:\n - /\n - /data/frontend/node_modules\n" > /etc/fixuid/config.yml
2017-09-19 12:19:14 +02:00
COPY ./entrypoint.sh /
RUN chmod a+x /entrypoint.sh
# Define working directory.
WORKDIR /data/frontend
2017-09-19 12:19:14 +02:00
# Define working user.
2021-08-05 08:31:51 +02:00
USER node:node
VOLUME /data/frontend/node_modules
ENV NODE_ENV=production
ENV HOME=/home/node
# Define default command.
ENTRYPOINT ["/entrypoint.sh"]
CMD ["bash"]