docker : add sample Dockerfile

This commit is contained in:
Antoine Pierlot-Garcin 2023-11-29 11:23:16 +01:00
parent ba678b0e6d
commit bd1459d495
2 changed files with 26 additions and 0 deletions

10
.dockerignore Normal file
View File

@ -0,0 +1,10 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

16
Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM node:alpine AS builder
USER node
COPY --chown=node \
package.json package-lock.json \
./usr/web/
WORKDIR /usr/web/
RUN npm ci
COPY --chown=node \
. /usr/web/
RUN npm run build
FROM sebp/lighttpd
COPY --from=builder /usr/web/build/ /var/www/localhost/htdocs/