This commit is contained in:
Lea 2023-09-26 20:24:01 +02:00
commit acb5259c32
Signed by: Lea
GPG key ID: 1BAFFE8347019C42
3 changed files with 28 additions and 0 deletions

1
README.md Normal file
View file

@ -0,0 +1 @@
Personal Dockerfile templates

13
javascript.Dockerfile Normal file
View file

@ -0,0 +1,13 @@
FROM node:18 as build
WORKDIR /build/app
COPY package.json /build/app/
COPY src /build/app/src/
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
RUN pnpm install
FROM node:18 as run
WORKDIR /app
COPY --from=build /build/app/ /app/
CMD ["node", "dist"]

14
typescript.Dockerfile Normal file
View file

@ -0,0 +1,14 @@
FROM node:18 as build
WORKDIR /build/app
COPY package.json tsconfig.json /build/app/
COPY src /build/app/src/
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
RUN pnpm install
RUN pnpm run build
FROM node:18 as run
WORKDIR /app
COPY --from=build /build/app/ /app/
CMD ["node", "dist"]