Skip to content

Commit 4a3fc1d

Browse files
authored
refactor dockerfile (#28)
1 parent f9db927 commit 4a3fc1d

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

Dockerfile

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
FROM golang:1.24-bookworm AS build
2-
32
WORKDIR /pikolo
43

54
RUN apt-get update -y \
@@ -11,26 +10,12 @@ RUN go mod download
1110
COPY . .
1211
RUN env CGO_ENABLED=0 go build -ldflags="-s -w"
1312

14-
FROM debian:bookworm-20241223-slim
15-
16-
# Update package lists and upgrade existing packages
17-
RUN apt-get update && apt-get upgrade -y
18-
19-
# Install packages required for the base image
20-
RUN apt-get install -y ca-certificates busybox \
21-
&& ln -s /bin/busybox /usr/bin/[[
22-
23-
# Clean up the package cache to reduce image size
24-
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
25-
26-
COPY --from=build /pikolo/pikolo /usr/local/bin
27-
COPY VERSION /VERSION
28-
29-
LABEL io.codefresh.engine="true"
30-
13+
FROM debian:bookworm-20250407-slim
3114
RUN adduser --gecos "" --disabled-password --home /home/cfu --shell /bin/bash cfu
32-
3315
USER cfu
3416

17+
COPY --from=build --chown=cfu:cfu /pikolo/pikolo /usr/local/bin
18+
COPY --chown=cfu:cfu VERSION /VERSION
19+
3520
ENTRYPOINT ["pikolo"]
3621
CMD [ "--help" ]

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.14.3
1+
0.14.4

0 commit comments

Comments
 (0)