File tree Expand file tree Collapse file tree 2 files changed +10
-16
lines changed
Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change 11# Define the build stage
2- FROM dhi.io/golang:1.22.2 -alpine3.19 as builder
2+ FROM dhi.io/golang:1.24 -alpine3.22-dev as builder
33
44# Set the working directory inside the container
55WORKDIR /app
@@ -13,14 +13,14 @@ COPY . .
1313# Run the Makefile command to build the binary
1414RUN make
1515
16+ # Ensure the binary is executable
17+ RUN chmod +x /app/bin/defender
18+
1619# Define the final base image
17- FROM dhi.io/alpine:3.18
20+ FROM dhi.io/alpine-base :3.22
1821
1922# Copy the built binary from the builder stage
2023COPY --from=builder /app/bin/defender /usr/local/bin/defender
2124
22- # Ensure the binary is executable
23- RUN chmod +x /usr/local/bin/defender
24-
2525# Set the command to run the binary
2626CMD ["defender" ]
Original file line number Diff line number Diff line change 11# Define the build stage
2- FROM golang:1.22.2 -alpine3.19 AS builder
2+ FROM dhi.io/ golang:1.24 -alpine3.22-dev AS builder
33
44# Set the working directory inside the container
55WORKDIR /app
66
7- # Install system dependencies including 'make'
8- RUN apk update && apk add --no-cache make
9-
107# Copy the source code and Makefile into the container
118COPY . .
129
1310# Run the Makefile command to build the binary
1411RUN make
1512
16- # Define the final base image
17- FROM dhi.io/alpine:3.18
13+ # Ensure the binary is executable
14+ RUN chmod +x /app/bin/monitorism
1815
19- # Install ca-certificates so that HTTPS works
20- RUN apk update && apk add --no-cache ca-certificates
16+ # Define the final base image
17+ FROM dhi.io/alpine-base:3.22
2118
2219# Copy the built binary from the builder stage
2320COPY --from=builder /app/bin/monitorism /usr/local/bin/monitorism
2421
25- # Ensure the binary is executable
26- RUN chmod +x /usr/local/bin/monitorism
27-
2822# Set the command to run the binary
2923CMD ["monitorism" ]
You can’t perform that action at this time.
0 commit comments