All checks were successful
Build and publish the docker image / build (push) Successful in 58s
Signed-off-by: ngn <ngn@ngn.tf>
37 lines
633 B
Docker
37 lines
633 B
Docker
FROM golang:1.24.0 AS builder
|
|
|
|
RUN apt update
|
|
RUN apt install -y sassc
|
|
|
|
WORKDIR /src
|
|
|
|
COPY *.mod ./
|
|
COPY *.sum ./
|
|
|
|
RUN go mod download
|
|
|
|
COPY *.go ./
|
|
COPY Makefile ./
|
|
COPY static ./static
|
|
COPY extract ./extract
|
|
COPY routes ./routes
|
|
COPY util ./util
|
|
COPY views ./views
|
|
|
|
RUN make CGO_ENABLED=0
|
|
|
|
FROM alpine AS runner
|
|
|
|
RUN adduser -h /app -D -u 1001 runner
|
|
|
|
COPY --from=builder /src/tren.elf /app/tren.elf
|
|
COPY --from=builder /src/views /app/views
|
|
COPY --from=builder /src/static /app/static
|
|
|
|
RUN rm /app/static/css/*.scss
|
|
RUN chown -R runner:runner /app
|
|
USER runner
|
|
|
|
WORKDIR /app
|
|
ENTRYPOINT ["/app/tren.elf"]
|