Skip to content

Commit ca48f76

Browse files
committed
feat: Remove compose-switch
1 parent ffa3f61 commit ca48f76

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ FROM cimg/base:current-22.04 AS base
6464
# https://docs.github.com/en/packages/learn-github-packages/connecting-a-repository-to-a-package
6565
LABEL org.opencontainers.image.source=https://github.com/DataDog/dd-trace-java-docker-build
6666

67-
# Replace Docker Compose and yq versions from CircleCI Base Image by latest
67+
# Replace Docker Compose and yq versions by latest and remove docker-switch from CircleCI Base Image for security purposes
6868
RUN <<-EOT
6969
set -eu
7070
dockerPluginDir=/usr/local/lib/docker/cli-plugins
7171
sudo curl -sSL "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)" -o $dockerPluginDir/docker-compose
7272
sudo chmod +x $dockerPluginDir/docker-compose
73-
sudo curl -fL "https://github.com/docker/compose-switch/releases/latest/download/docker-compose-linux-$(dpkg --print-architecture)" -o /usr/local/bin/compose-switch
74-
sudo chmod +x /usr/local/bin/compose-switch
73+
sudo sudo update-alternatives --remove docker-compose /usr/local/bin/compose-switch
74+
sudo rm -f /usr/local/bin/compose-switch
7575
sudo rm /usr/local/bin/{install-man-page.sh,yq*}
7676
curl -sSL "https://github.com/mikefarah/yq/releases/latest/download/yq_linux_$(dpkg --print-architecture).tar.gz" | sudo tar -xz -C /usr/local/bin --wildcards --no-anchored 'yq_linux_*'
7777
sudo mv /usr/local/bin/yq{_linux_*,}

0 commit comments

Comments
 (0)