diff options
author | terminaldweller <thabogre@gmail.com> | 2022-03-21 08:44:47 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2022-03-21 08:44:47 +0000 |
commit | 9c6713a8cee48529eb11f7b16845eb6bd1e2a482 (patch) | |
tree | 784f86fe95e051703fe07225ea9015a21058a9d7 /spring-front/Dockerfile | |
parent | daily commit.wip (diff) | |
download | mdrtl-9c6713a8cee48529eb11f7b16845eb6bd1e2a482.tar.gz mdrtl-9c6713a8cee48529eb11f7b16845eb6bd1e2a482.zip |
wip
Diffstat (limited to 'spring-front/Dockerfile')
-rw-r--r-- | spring-front/Dockerfile | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spring-front/Dockerfile b/spring-front/Dockerfile new file mode 100644 index 0000000..c4d0b14 --- /dev/null +++ b/spring-front/Dockerfile @@ -0,0 +1,19 @@ +FROM node:16.14.2-alpine as builder +WORKDIR /app +ENV PATH /app/node_modules/.bin:$PATH +COPY package.json ./ +COPY package-lock.json ./ +RUN npm ci +RUN npm install react-scripts -g +COPY . ./ +RUN npm run build + +FROM node:lts-alpine3.13 as certbuilder +RUN apk add openssl +WORKDIR /certs +RUN openssl req -nodes -new -x509 -subj="/C=US/ST=Denial/L=springfield/O=Dis/CN=localhost" -keyout server.key -out server.cert + +FROM nginx:stable-alpine +COPY --from=builder /app/build /usr/share/nginx/html +COPY --from=certbuilder /certs /certs +CMD ["nginx", "-g", "daemon off;"] |