build: multi-stage Dockerfile with yq build step
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -1,5 +1,17 @@
|
|||||||
|
FROM alpine:3.21 AS builder
|
||||||
|
|
||||||
|
RUN apk add --no-cache bash yq coreutils findutils
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN chmod +x build.sh render.sh nginx/generate-nginx.sh && \
|
||||||
|
./build.sh
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
COPY build/ /usr/share/nginx/html/
|
|
||||||
COPY nginx/nginx.conf /etc/nginx/nginx.conf
|
COPY --from=builder /src/build/ /usr/share/nginx/html/
|
||||||
|
COPY --from=builder /src/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
RUN nginx -t
|
RUN nginx -t
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
Reference in New Issue
Block a user