-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
28 lines (20 loc) · 891 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
FROM amazoncorretto:17.0.0@sha256:175957b964349d8d75850e43603cf65f740ced597faed22ee7db4f575a841d4a
LABEL maintainer "Koen Rouwhorst <[email protected]>"
# NOTE: https://rtyley.github.io/bfg-repo-cleaner/
ENV BFG_VERSION="1.14.0"
ENV BFG_CHECKSUM="1a75e9390541f4b55d9c01256b361b815c1e0a263e2fb3d072b55c2911ead0b7"
RUN yum upgrade -y && \
yum install -y shadow-utils
ENV HOME /home/bfg
RUN useradd --create-home --home-dir $HOME bfg \
&& chown -R bfg:bfg $HOME
COPY ./entrypoint.sh /home/bfg/
RUN chmod +x /home/bfg/entrypoint.sh
WORKDIR /tmp
RUN curl "https://repo1.maven.org/maven2/com/madgag/bfg/$BFG_VERSION/bfg-$BFG_VERSION.jar" \
-o "bfg-$BFG_VERSION.jar" \
&& echo "$BFG_CHECKSUM bfg-$BFG_VERSION.jar" | sha256sum -c - \
&& mv "bfg-$BFG_VERSION.jar" /home/bfg/bfg.jar
WORKDIR "$HOME/workspace"
USER bfg
ENTRYPOINT ["/home/bfg/entrypoint.sh", "/home/bfg/bfg.jar"]