-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (27 loc) · 692 Bytes
/
Dockerfile
File metadata and controls
29 lines (27 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Build environment
FROM node:20-alpine3.19 AS build
# Create app directory
WORKDIR /app
# Set environments
ENV PATH /app/node_modules/.bin:$PATH
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN npm install
# Copy app
COPY . .
# Build
RUN npm run build
# Production environment
FROM alpine:3.22
# Connect repository
LABEL org.opencontainers.image.source https://github.com/derogab/poop-cleaner
# Create app directory
WORKDIR /app
# Copy app
COPY --from=build /app/dist/poop-cleaner /app
# Make executable
RUN chmod +x /app/poop-cleaner
# Run command
CMD ["/app/poop-cleaner"]