forked from qmk/qmk_configurator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (19 loc) · 719 Bytes
/
Dockerfile
File metadata and controls
25 lines (19 loc) · 719 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
# This file uses a multi-stage build strategy. The build stage sets up the nvm environment and builds configurator, while the second stage copies this into a clean container without any build tools.
## First Stage- Build
FROM node:14 as build
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
# Copy files into place
COPY . /qmk_configurator/
WORKDIR /qmk_configurator/
# Build configurator
RUN yarn install
ENV VITE_API_URL=/api
RUN yarn run build
## Second Stage- Run
FROM nginx as run
EXPOSE 80/tcp
COPY --from=build /qmk_configurator/dist /qmk_configurator/dist
COPY conf/nginx.conf.in /etc/nginx/nginx.conf.in
COPY bin/docker_run.sh /qmk_configurator/bin/docker_run.sh
CMD /bin/bash -i /qmk_configurator/bin/docker_run.sh