Skip to content

Commit

Permalink
Improve build
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Apr 21, 2024
1 parent d2de8a1 commit f9e6e4b
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
FROM golang:latest AS gojekyll

ADD . /gojekyll

WORKDIR /gojekyll

RUN go build main.go

FROM bufbuild/buf AS buf
FROM dart:stable AS sass

Expand All @@ -17,6 +9,21 @@ RUN git clone https://github.com/sass/dart-sass.git /dart-sass && \
dart run grinder protobuf && \
dart compile exe bin/sass.dart


FROM golangci/golangci-lint:latest AS golangci-lint
FROM golang:latest AS gojekyll

ADD . /gojekyll

COPY --from=golangci-lint /usr/bin/golangci-lint /usr/bin/golangci-lint
COPY --from=sass /dart-sass/bin/sass.exe /usr/bin/sass

WORKDIR /gojekyll

RUN golangci-lint run
RUN go test ./...
RUN go build main.go

FROM debian:stable-slim

COPY --from=gojekyll /gojekyll/main /usr/bin/gojekyll
Expand Down

0 comments on commit f9e6e4b

Please sign in to comment.