mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
build: create multi-arch Docker images
Create multi-arch Docker images. Currently built platforms are: * linux/amd64 * linux/arm64 * linux/arm/v7 Signed-off-by: LuBashQ <cristian.lupascu.nicolae@gmail.com>
This commit is contained in:
parent
fb03c4aaa4
commit
56c88e7d5f
2 changed files with 11 additions and 2 deletions
6
.github/workflows/publish-to-hub-docker.yml
vendored
6
.github/workflows/publish-to-hub-docker.yml
vendored
|
|
@ -34,6 +34,9 @@ jobs:
|
|||
with:
|
||||
images: johannesjo/super-productivity
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
|
|
@ -43,3 +46,6 @@ jobs:
|
|||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
BUILDKIT_CONTEXT_KEEP_GIT_DIR=1
|
||||
platforms: linux/amd64, linux/arm64, linux/arm/v7
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
### build ###
|
||||
|
||||
# base image
|
||||
FROM node:20 as build
|
||||
FROM --platform=$BUILDPLATFORM node:20 as build
|
||||
|
||||
# add app
|
||||
COPY . /app
|
||||
|
|
@ -26,7 +26,10 @@ RUN npm run buildFrontend:prodWeb
|
|||
### serve ###
|
||||
|
||||
# base image
|
||||
FROM nginx:1-alpine
|
||||
# --platform=$TARGETPLATFORM is redundant and docker will raise a warning,
|
||||
# but it makes it clearer that the target platform might be different from the
|
||||
# build platform
|
||||
FROM --platform=$TARGETPLATFORM nginx:1-alpine
|
||||
|
||||
# environmental variables
|
||||
ENV PORT=80
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue