hastebin-build/stable/Dockerfile

29 lines
652 B
Docker
Raw Permalink Normal View History

2020-06-07 19:51:15 +00:00
FROM node:current-alpine
ARG HASTEBIN_VERSION
ENV UID=1005 GID=1005
COPY run.sh /usr/local/bin/run.sh
RUN apk -U upgrade \
&& apk --no-cache add git su-exec \
&& git clone --depth 1 https://github.com/seejohnrun/haste-server.git /app \
2020-06-07 19:51:15 +00:00
&& cd app \
&& git checkout ${HASTEBIN_VERSION} \
&& npm install \
&& npm cache clean --force \
&& mkdir /.npm \
2020-06-07 19:51:15 +00:00
&& apk del git \
&& rm -rf /var/lib/apk/* /var/cache/apk/* \
&& chmod +x /usr/local/bin/run.sh
# we cannot copy this before the RUN because
# git clone will fail if app/ is not empty
COPY config.js /app/config.js
WORKDIR /app
VOLUME /app/data
EXPOSE 7777
ENTRYPOINT ["run.sh"]