24 lines
498 B
Docker
24 lines
498 B
Docker
FROM node AS builder
|
|
|
|
RUN wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz && \
|
|
tar -C /usr/local -xzf go1.21.5.linux-amd64.tar.gz && \
|
|
rm go1.21.5.linux-amd64.tar.gz
|
|
|
|
ENV PATH=$PATH:/usr/local/go/bin
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN npm install
|
|
RUN npm run gen-css
|
|
|
|
RUN go build -o ${REPO_NAME_LOWER} .
|
|
|
|
FROM gcr.io/distroless/static-debian12
|
|
|
|
COPY --from=builder /app/${REPO_NAME_LOWER} /${REPO_NAME_LOWER}
|
|
COPY --from=builder /app/public /public
|
|
COPY --from=builder /app/templates /templates
|
|
|