-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathDockerfile
47 lines (39 loc) · 1.53 KB
/
Dockerfile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Use an official node image
FROM node:20.18.0-alpine3.20
RUN set -xe \
&& apk add --no-cache bash git openssh \
&& git --version && bash --version && ssh -V && npm -v && node -v
# Environment Variables
ENV NODE_ENV production
RUN mkdir -p /opt/react-json-schema
WORKDIR /opt/react-json-schema
COPY src/ /opt/react-json-schema/src
COPY .babelrc /opt/react-json-schema/.babelrc
COPY scripts/generator/ /opt/react-json-schema/scripts/generator
COPY package.json /opt/react-json-schema/package.json
COPY package-lock.json /opt/react-json-schema/package-lock.json
COPY index.js /opt/react-json-schema/index.js
COPY webpack.config.js /opt/react-json-schema/webpack.config.js
RUN npm install
RUN npm link webpack && \
npm link webpack-cli && \
npm link compression-webpack-plugin && \
npm link babel-loader && \
npm link @babel/core && \
npm link @babel/plugin-transform-runtime && \
npm link @babel/plugin-proposal-class-properties && \
npm link @babel/plugin-proposal-object-rest-spread && \
npm link @babel/plugin-proposal-optional-chaining && \
npm link @babel/plugin-syntax-dynamic-import && \
npm link @babel/plugin-transform-modules-commonjs && \
npm link @babel/plugin-transform-runtime && \
npm link @babel/polyfill && \
npm link @babel/preset-env && \
npm link @babel/preset-react && \
npm link @babel/preset-typescript && \
npm link @babel/register && \
npm link @babel/runtime
RUN node scripts/generator/index.js
RUN npx webpack
# EXPOSE 3000
CMD ["node", "index.js"]