Optimize Dockerfile, add arm64!
Removing "--platform=" and slightly re-structuring the "apt-get" calls allows for this image to be successfuly built for arm64 as well - at least on an arm64 host.
This commit is contained in:
parent
88811fbcd2
commit
5acc1d9af7
1 changed files with 7 additions and 5 deletions
12
Dockerfile
12
Dockerfile
|
|
@ -1,14 +1,16 @@
|
||||||
FROM --platform=linux/amd64 node:19-buster-slim as build
|
FROM node:19-buster-slim as build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json package-lock.json .
|
RUN apt-get update -y && apt-get install -y openssl python3 build-essential make gcc
|
||||||
|
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
RUN npm i
|
RUN npm i
|
||||||
|
|
||||||
|
RUN apt-get purge -y gcc make build-essential && apt-get autoremove -y
|
||||||
|
|
||||||
COPY src/ src/
|
COPY src/ src/
|
||||||
COPY prisma/schema.prisma prisma/
|
COPY prisma/schema.prisma prisma/
|
||||||
COPY tsconfig.json .
|
COPY tsconfig.json ./
|
||||||
|
|
||||||
RUN apt-get update -y && apt-get install -y openssl
|
|
||||||
|
|
||||||
RUN npx prisma generate
|
RUN npx prisma generate
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue