hastebin-build/latest/Dockerfile
Armin Friedl f089a6051e
Hastebin rolling release
Add first test files for a hastebin build from master

Signed-off-by: Armin Friedl <dev@friedl.net>
2020-05-22 10:08:12 +02:00

27 lines
623 B
Docker

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 https://github.com/seejohnrun/haste-server.git /app \
&& cd app \
&& git checkout ${HASTEBIN_VERSION} \
&& npm install \
&& npm cache clean --force \
&& 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"]