File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
ARG IMAGE
2
2
FROM golang:1.22-bullseye as build
3
- RUN apt-get update && apt-get install -y curl && apt-get remove -y python* && apt-get autoremove -y
3
+ RUN apt-get update && apt-get install -y curl && apt-get remove -y python* && apt-get autoremove -y && apt-get clean
4
4
WORKDIR backup
5
5
COPY backup/aws aws/
6
6
COPY backup/azure azure/
@@ -17,10 +17,14 @@ FROM ${IMAGE} as final
17
17
ARG DISTRIBUTION
18
18
RUN \
19
19
if [ "${DISTRIBUTION}" = "debian" ]; then \
20
- apt-get update && apt-get install -y bash netcat-openbsd curl wget gnupg apt-transport-https apt-utils lsb-release unzip less && rm -rf /var/lib/apt/lists/* ; \
20
+ apt-get update && apt-get install -y bash netcat-openbsd curl wget gnupg apt-transport-https apt-utils lsb-release unzip less && \
21
+ apt-get remove -y python* && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* ; \
21
22
else \
22
23
# for redhat
23
- microdnf update -y && microdnf install -y bash nc wget gnupg yum-utils unzip less ; \
24
+ microdnf update -y && microdnf install -y bash nc wget gnupg yum-utils unzip less && \
25
+ # Safely remove python packages without affecting protected packages
26
+ microdnf remove -y python3 python3-pip python2 python2-pip --exclude=dnf,libdnf --nobest || true && \
27
+ microdnf clean all ; \
24
28
fi
25
29
COPY --from=build /go/backup/backup_linux bin/backup
26
30
ENV NEO4J_server_config_strict__validation_enabled=false
You can’t perform that action at this time.
0 commit comments