-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (16 loc) · 697 Bytes
/
Dockerfile
File metadata and controls
22 lines (16 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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/node_modules/.bin:$PATH
COPY /react-app/package.json /app/package.json
WORKDIR /app
RUN npm install
RUN npm install -g react-scripts
CMD echo 'Image Builded - docker-react-backend'