Skip to content

Commit 39b3135

Browse files
committed
remove packages
Signed-off-by: zhangzujian <zhangzujian.7@gmail.com>
1 parent 933e221 commit 39b3135

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

dist/images/Dockerfile.base

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ RUN mkdir /packages/ && \
170170
cp /usr/src/python3-openvswitch*deb /packages && \
171171
cp /usr/src/ovn-*deb /packages && \
172172
cp /usr/src/ovs/tutorial/ovs-sandbox /packages && \
173-
cd /packages && rm -f *source* *doc* *datapath* *docker* *vtep* *test* *dev*
173+
cd /packages && rm -f *source* *doc* *datapath* *docker* *vtep* *test* *dev* *ipsec* *pki* **python*
174174

175175
FROM ghcr.io/aquasecurity/trivy:latest AS trivy
176176

@@ -199,11 +199,13 @@ ARG ARCH
199199
ARG DEBIAN_FRONTEND=noninteractive
200200
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
201201
--mount=type=cache,target=/var/lib/apt,sharing=locked \
202-
apt update && apt upgrade -y && apt install ca-certificates python3 hostname libunwind8 netbase \
203-
ethtool iproute2 ncat libunbound8 procps libatomic1 kmod iptables python3-netifaces python3-sortedcontainers \
204-
tcpdump ipvsadm ipset curl uuid-runtime openssl inetutils-ping arping ndisc6 conntrack traceroute iputils-tracepath \
205-
logrotate dnsutils net-tools strongswan strongswan-pki libcharon-extra-plugins libmnl0 \
206-
libcharon-extauth-plugins libstrongswan-extra-plugins libstrongswan-standard-plugins -y --no-install-recommends && \
202+
apt update && apt upgrade -y && apt install ca-certificates hostname libunwind8 netbase \
203+
ethtool iproute2 ncat libunbound8 procps libatomic1 kmod iptables \
204+
tcpdump ipvsadm ipset curl uuid-runtime inetutils-ping arping ndisc6 conntrack traceroute iputils-tracepath \
205+
logrotate dnsutils net-tools -y --no-install-recommends && \
206+
apt remove --allow-remove-essential -y coreutils login libpam-runtime libpam-modules libpam-modules-bin libpam0g util-linux libkrb5support0 libbpf1 libelf1t64 && \
207+
apt autoremove -y && \
208+
dpkg -r gpgv && \
207209
setcap CAP_NET_ADMIN+eip $(readlink -f $(which conntrack)) && \
208210
setcap CAP_NET_ADMIN+eip $(readlink -f $(which ethtool)) && \
209211
setcap CAP_NET_ADMIN+eip $(readlink -f $(which ip)) && \
@@ -244,7 +246,7 @@ RUN --mount=type=bind,target=/packages,from=ovs-builder,source=/packages \
244246
cp /packages/bfdd-beacon /packages/bfdd-control /usr/bin/ && \
245247
cp /packages/ovs-sandbox /usr/bin/ && chmod +x /usr/bin/ovs-sandbox && \
246248
setcap CAP_NET_BIND_SERVICE+eip /usr/bin/bfdd-beacon && \
247-
dpkg -i /packages/openvswitch-*.deb /packages/python3-openvswitch*.deb && \
249+
dpkg -i /packages/openvswitch-*.deb && \
248250
dpkg -i --ignore-depends=openvswitch-switch,openvswitch-common /packages/ovn-*.deb && \
249251
rm -rf /var/lib/openvswitch/pki/ && \
250252
chown -R nobody: /var/lib/logrotate && \

0 commit comments

Comments
 (0)