File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 runs-on : ubuntu-latest
77 steps :
88 - uses : actions/checkout@v2
9+ - name : Set up Docker Buildx
10+ uses : docker/setup-buildx-action@v2
911 - name : Build
10- uses : docker/build-push-action@v1
12+ uses : docker/build-push-action@v3
1113 with :
1214 push : false
Original file line number Diff line number Diff line change 11# Install the base requirements for the app.
22# This stage is to support development.
3- FROM python:alpine AS base
3+ FROM --platform=$BUILDPLATFORM python:alpine AS base
44WORKDIR /app
55COPY requirements.txt .
66RUN pip install -r requirements.txt
77
8- FROM node:18-alpine AS app-base
8+ FROM --platform=$BUILDPLATFORM node:18-alpine AS app-base
99WORKDIR /app
1010COPY app/package.json app/yarn.lock ./
1111COPY app/spec ./spec
@@ -25,16 +25,16 @@ RUN apk add zip && \
2525 zip -r /app.zip /app
2626
2727# Dev-ready container - actual files will be mounted in
28- FROM base AS dev
28+ FROM --platform=$BUILDPLATFORM base AS dev
2929CMD ["mkdocs" , "serve" , "-a" , "0.0.0.0:8000" ]
3030
3131# Do the actual build of the mkdocs site
32- FROM base AS build
32+ FROM --platform=$BUILDPLATFORM base AS build
3333COPY . .
3434RUN mkdocs build
3535
3636# Extract the static content from the build
3737# and use a nginx image to serve the content
38- FROM nginx:alpine
38+ FROM --platform=$TARGETPLATFORM nginx:alpine
3939COPY --from=app-zip-creator /app.zip /usr/share/nginx/html/assets/app.zip
4040COPY --from=build /app/site /usr/share/nginx/html
You can’t perform that action at this time.
0 commit comments