Skip to content

Commit

Permalink
Migrate dockerfile back to alpine (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada committed Dec 3, 2022
1 parent 4e0b212 commit d373da9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
FROM ubuntu:22.04 AS build
ENV GOVER=1.19.2
FROM golang:1.19-alpine AS build
ADD . /src
RUN apt update && apt -y install libvips-dev wget build-essential
RUN wget -qO- https://go.dev/dl/go$GOVER.linux-amd64.tar.gz | tar -C /src -xzf -
RUN cd /src/cmd/api && /src/go/bin/go build
RUN apk add --no-cache build-base pkgconfig vips-dev
RUN cd /src/cmd/api && go build

FROM ubuntu:22.04
FROM alpine:latest
WORKDIR /app
COPY --from=build /src/cmd/api/api /app/
RUN apt update && apt install -y ca-certificates libvips && apt clean
RUN apk add --no-cache ca-certificates vips
CMD ["./api"]

0 comments on commit d373da9

Please sign in to comment.