Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani committed Jun 13, 2024
1 parent c7526c0 commit 5fb42f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docker/heplify/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
FROM golang:alpine as builder
FROM golang:1.22.4-alpine3.20 as builder
RUN apk --update add linux-headers musl-dev gcc libpcap-dev ca-certificates git
RUN apk --update add --no-cache git build-base
RUN git clone https://luajit.org/git/luajit-2.0.git \
&& cd luajit-2.0 \
&& git checkout v2.1 \
&& make CCOPT="-static -fPIC" BUILDMODE="static" && make install
COPY . /heplify
WORKDIR /heplify
RUN CGO_ENABLED=1 GOOS=linux go build -a --ldflags '-linkmode external -extldflags "-static -s -w"' -o heplify .

FROM alpine
FROM alpine:3.20
RUN apk --no-cache add ca-certificates tzdata libcap
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /heplify/heplify .
Expand Down

0 comments on commit 5fb42f7

Please sign in to comment.