mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 03:25:52 +01:00
Merge pull request #996 from vector-im/hughns/docker-buildkit
Build docker image for multiple architectures including ARM
This commit is contained in:
commit
2a1f9c5cad
4
.github/workflows/docker-publish.yml
vendored
4
.github/workflows/docker-publish.yml
vendored
@ -23,6 +23,9 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Log into registry ${{ env.REGISTRY }}
|
- name: Log into registry ${{ env.REGISTRY }}
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
@ -42,3 +45,4 @@ jobs:
|
|||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM docker.io/node:alpine as builder
|
FROM --platform=${BUILDPLATFORM} docker.io/node:alpine as builder
|
||||||
RUN apk add --no-cache git python3 build-base
|
RUN apk add --no-cache git python3 build-base
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@ -10,7 +10,7 @@ RUN yarn install
|
|||||||
COPY . /app
|
COPY . /app
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
FROM docker.io/nginx:alpine
|
FROM --platform=${BUILDPLATFORM} docker.io/nginx:alpine
|
||||||
|
|
||||||
# Copy the dynamic config script
|
# Copy the dynamic config script
|
||||||
COPY ./docker/dynamic-config.sh /docker-entrypoint.d/99-dynamic-config.sh
|
COPY ./docker/dynamic-config.sh /docker-entrypoint.d/99-dynamic-config.sh
|
||||||
|
@ -35,7 +35,9 @@ To stop the container, simply hit `ctrl+c`.
|
|||||||
|
|
||||||
In this repository, create a Docker image:
|
In this repository, create a Docker image:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
|
# Enable BuildKit https://docs.docker.com/develop/develop-images/build_enhancements/
|
||||||
|
export DOCKER_BUILDKIT=1
|
||||||
docker build -t hydrogen .
|
docker build -t hydrogen .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user