forked from jserv/facebooc
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
27 lines (22 loc) · 838 Bytes
/
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
FROM debian:latest as build
LABEL Author="[email protected]"
WORKDIR /app
RUN apt-get update -y && \
apt-get install -y libsqlite3-dev libssl-dev \
build-essential sassc
COPY . .
RUN make release
FROM alpine:latest
LABEL Author="[email protected]"
ENV port 8080
ENV DB_PATH "/app/data/db.sqlite3"
WORKDIR /app
RUN apk add sqlite-dev libc6-compat libressl-dev --no-cache && \
mkdir -p /app/data && touch ${DB_PATH} && chmod 600 ${DB_PATH} && chown -R 1000:1000 /app/data
COPY ["static/image", "/app/static/image/"]
COPY ["templates", "/app/templates/"]
COPY --from=build --chown=1000:1000 /app/bin/facebooc /app/facebooc
COPY --from=build --chown=1000:1000 /app/templates/version.html /app/templates/
COPY --from=build --chown=1000:1000 /app/static/css /app/static/css
USER 1000
CMD /app/facebooc ${port}