-
Notifications
You must be signed in to change notification settings - Fork 327
/
Dockerfile
44 lines (29 loc) · 890 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM gradle:6.8-jdk11 as builder
LABEL maintainer="https://jbake.org/community/team.html"
ENV JBAKE_HOME=/opt/jbake
RUN mkdir -p ${JBAKE_HOME}
COPY . /usr/src/jbake
RUN set -o errexit -o nounset \
&& echo "Building JBake" \
&& cd /usr/src/jbake \
&& gradle --no-daemon installDist \
&& cp -r jbake-dist/build/install/jbake/* $JBAKE_HOME \
&& rm -r ~/.gradle /usr/src/jbake
FROM eclipse-temurin:11-jre-alpine
ENV JBAKE_USER=jbake
ENV JBAKE_HOME=/opt/jbake
ENV PATH ${JBAKE_HOME}/bin:$PATH
ENV TZ=UTC
RUN apk --no-cache update && \
apk --no-cache upgrade && \
apk add --update tzdata && \
rm -rf /var/cache/apk/*
RUN echo ${TZ} > /etc/timezone
RUN adduser -D -u 1000 -g "" ${JBAKE_USER} ${JBAKE_USER}
USER ${JBAKE_USER}
COPY --from=builder /opt/jbake /opt/jbake
WORKDIR /mnt/site
VOLUME ["/mnt/site"]
ENTRYPOINT ["jbake"]
CMD ["-b"]
EXPOSE 8820