-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (22 loc) · 1.09 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
# This image run webpack sample and node for development
# all files are running inside the container even the node_modules
#
# TIP 1: the node_modules folder will be empty in the local folder
# TIP 2: if you want to install new dependencies like: npm install <new_dep>, you have to recreate the image
# TIP 2: run bash from the the node image:
# $ docker run -it --entrypoint /bin/bash <image_name>
# FROM node:14.18.1-buster
FROM node:lts-alpine3.14
# add `/app/node_modules/.bin` to the $PATH
ENV PATH /app/frontend/node_modules/.bin:$PATH
COPY ./frontend/package.json /app/frontend/package.json
# COPY ./frontend/package-lock.json /app/frontend/package-lock.json
COPY ./frontend/.eslintrc.js /app/frontend/.eslintrc.js
COPY ./frontend/.prettierrc /app/frontend/.prettierrc
COPY ./frontend/tsconfig.json /app/frontend/tsconfig.json
COPY ./frontend/webpack.common.js /app/frontend/webpack.common.js
COPY ./frontend/webpack.dev.js /app/frontend/webpack.dev.js
COPY ./frontend/webpack.prod.js /app/frontend/webpack.prod.js
WORKDIR /app/frontend
RUN npm install
CMD echo 'Image Builded - webpack-typescript-sample'