forked from tapis-project/tapis-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.nix
More file actions
25 lines (21 loc) · 750 Bytes
/
Copy pathDockerfile.nix
File metadata and controls
25 lines (21 loc) · 750 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
# syntax=docker/dockerfile:1.7-labs
FROM nixos/nix:2.21.0 as build-stage
WORKDIR /tapisui
# Copy flake files and source
COPY flake.nix flake.lock ./
COPY \
--exclude=**node_modules* \
--exclude=**dist* \
--exclude=./.vscode \
--exclude=./__pycache__ \
--exclude=./__mocks__ \
--exclude=./.github \
--exclude=./build \
--exclude=./deploy \
./ ./
# Set up Nix cache for dependencies (optional, but speeds up builds)
RUN nix --extra-experimental-features 'nix-command flakes' develop --command pnpm install
RUN nix --extra-experimental-features 'nix-command flakes' develop --command pnpm -r build
FROM nginx:alpine as production-stage
COPY --from=build-stage /tapisui/dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]