Skip to content

Commit

Permalink
ci: switch to alpine base image (see #15)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed Apr 26, 2024
1 parent ee03c20 commit 4d364ec
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:latest AS build
FROM golang:alpine AS build

WORKDIR /app/

Expand All @@ -7,15 +7,13 @@ COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build \
go build -ldflags "-s -w" main.go

FROM debian:stable-slim
FROM alpine

RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN apk --no-cache add --no-check-certificate ca-certificates \
&& update-ca-certificates

WORKDIR /app/

COPY --from=build /app/main /app/ryd-proxy
COPY --from=build /app/main /ryd-proxy

EXPOSE 3000
CMD ./ryd-proxy
CMD [ "/ryd-proxy" ]

0 comments on commit 4d364ec

Please sign in to comment.