-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
38 lines (23 loc) · 1 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Dockerfile for One-Time Secret http://onetimesecret.com
FROM alpine:latest as PKGGET
RUN apk --no-cache add zip
ADD https://github.com/onetimesecret/onetimesecret/archive/refs/heads/main.zip /tmp/onetime.zip
RUN /usr/bin/unzip /tmp/onetime.zip -d /extract/
FROM ruby:2.6-alpine
LABEL MAINTAINER ant <[email protected]>
COPY --from=PKGGET /extract/* /var/lib/onetime/
WORKDIR /var/lib/onetime
RUN adduser ots -h /var/lib/onetime -D && \
mkdir -p /var/log/onetime /var/run/onetime /etc/onetime && \
chown ots /var/log/onetime /var/run/onetime /var/lib/onetime /etc/onetime && \
cp -R etc/* /etc/onetime/ && \
chown ots: /var/lib/onetime/* -R
RUN apk --no-cache --virtual .build-deps add build-base && \
bundle update && \
bundle install --frozen --deployment --without=dev && \
bin/ots init && \
apk del .build-deps
ADD config/config /etc/onetime/config
ADD config/fortunes /etc/onetime/fortunes
EXPOSE 7143
ENTRYPOINT ["su", "ots", "-c", "bundle exec thin -e dev -R config.ru -p 7143 start"]