From 5dbc96362a5461c8ed3695b8ddf2c5e76949f031 Mon Sep 17 00:00:00 2001 From: xeptore <29199390+xeptore@users.noreply.github.com> Date: Thu, 23 Mar 2023 14:29:37 +0330 Subject: [PATCH] fix docker image build error Signed-off-by: xeptore <29199390+xeptore@users.noreply.github.com> --- Dockerfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 67c09f5..e3a2e1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM docker.io/library/golang:1 AS build -RUN apt-get update && apt-get upgrade -y && apt-get install -y libssl-dev pkg-config +RUN apt-get update && apt-get upgrade -y && apt-get install -y libssl-dev pkg-config xz-utils RUN update-ca-certificates @@ -20,11 +20,12 @@ COPY --chown=nonroot:nonroot . . RUN make build -RUN wget https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-amd64_linux.tar.xz \ - && tar -xvf upx-4.0.2-amd64_linux.tar.xz upx-4.0.2-amd64_linux/upx \ - && mv ./upx-4.0.2-amd64_linux/upx . \ - && ./upx --no-color --mono --no-progress --ultra-brute --no-backup ./bin/ingest \ - && ./upx --test ./bin/ingest +RUN set -ex && \ + wget https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-amd64_linux.tar.xz && \ + tar -xvf upx-4.0.2-amd64_linux.tar.xz upx-4.0.2-amd64_linux/upx && \ + mv ./upx-4.0.2-amd64_linux/upx . && \ + ./upx --no-color --mono --no-progress --ultra-brute --no-backup ./bin/ingest && \ + ./upx --test ./bin/ingest FROM gcr.io/distroless/base-debian11:nonroot