mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-24 20:14:53 +01:00
Multi-arch capable Dockerfile
This commit is contained in:
parent
652e2c6d3b
commit
ea5723cb32
15
Dockerfile
15
Dockerfile
@ -1,9 +1,14 @@
|
|||||||
FROM docker.io/node:alpine as builder
|
FROM --platform=${BUILDPLATFORM} docker.io/library/node:16.13-alpine3.15 as builder
|
||||||
RUN apk add --no-cache git python3 build-base
|
RUN apk add --no-cache git python3 build-base
|
||||||
COPY . /app
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN yarn install \
|
|
||||||
&& yarn build
|
|
||||||
|
|
||||||
FROM docker.io/nginx:alpine
|
# Install the dependencies first
|
||||||
|
COPY yarn.lock package.json ./
|
||||||
|
RUN yarn install
|
||||||
|
|
||||||
|
# Copy the rest and build the app
|
||||||
|
COPY . .
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
|
FROM --platform=${TARGETPLATFORM} docker.io/library/nginx:alpine
|
||||||
COPY --from=builder /app/target /usr/share/nginx/html
|
COPY --from=builder /app/target /usr/share/nginx/html
|
||||||
|
@ -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