Skip to content

Commit 332052f

Browse files
committed
feat: add Dockerfile
1 parent 4f7ee44 commit 332052f

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
dist/
3+
.github/
4+
Dockerfile
5+
.dockerignore
6+
README.md

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
FROM node:22.11.0-slim@sha256:f035ba7ffee18f67200e2eb8018e0f13c954ec16338f264940f701997e3c12da AS builder
3+
4+
WORKDIR /app
5+
6+
COPY package*.json ./
7+
8+
RUN npm install --no-fund --no-audit
9+
10+
COPY . .
11+
12+
RUN npm run build
13+
14+
FROM nginx:1.27.4-alpine@sha256:4ff102c5d78d254a6f0da062b3cf39eaf07f01eec0927fd21e219d0af8bc0591
15+
16+
COPY --from=builder /app/dist /usr/share/nginx/html
17+
18+
EXPOSE 80
19+
20+
CMD ["nginx", "-g", "daemon off;"]

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"test": "vitest",
1010
"lint": "eslint .",
1111
"preview": "vite preview",
12-
"format": "prettier --write --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx,json,css,md}'"
12+
"format": "prettier --write --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx,json,css,md}'",
13+
"docker:build": "docker build --tag wildcat-dashboard-ui ."
1314
},
1415
"dependencies": {
1516
"@radix-ui/react-checkbox": "^1.1.4",

0 commit comments

Comments
 (0)