forked from koenrh/docker-bfg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
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:11.0.7@sha256:595d3791e579d4a17c238b6c657ec1d585f15acad53670fd7cda83193cab2e30
LABEL maintainer "Koen Rouwhorst <[email protected]>"
# NOTE: https://rtyley.github.io/bfg-repo-cleaner/
ENV BFG_VERSION="1.13.0"
ENV BFG_CHECKSUM="bf22bab9dd42d4682b490d6bc366afdad6c3da99f97521032d3be8ba7526c8ce"
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"]