-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (21 loc) · 948 Bytes
/
Dockerfile
File metadata and controls
30 lines (21 loc) · 948 Bytes
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
FROM eclipse-temurin:25-jre-jammy
LABEL org.opencontainers.image.authors="Jon LaBelle <https://jonlabelle.com>" \
org.opencontainers.title="bfg" \
org.opencontainers.image.description="Docker image for BFG Repo-Cleaner, a tool for removing large files and sensitive data from Git repository history" \
org.opencontainers.image.source="https://github.com/jonlabelle/docker-bfg" \
org.opencontainers.image.licenses="MIT"
ARG BFG_VERSION=1.15.0
# hadolint ignore=DL3008
RUN apt-get update && \
apt-get install -y --no-install-recommends curl git && \
rm -rf /var/lib/apt/lists/*
WORKDIR /work
RUN curl -fsSL -o /usr/local/bin/bfg.jar \
"https://repo1.maven.org/maven2/com/madgag/bfg/${BFG_VERSION}/bfg-${BFG_VERSION}.jar"
COPY entrypoint.sh /usr/local/bin/bfg
RUN chmod +x /usr/local/bin/bfg
# Create non-root user
RUN useradd -m -u 1000 -s /bin/bash bfg && \
chown -R bfg:bfg /work
USER bfg
ENTRYPOINT ["/usr/local/bin/bfg"]