I have a react app which after some times I managed to build with docker. Everything here is done on my local machine(windows 10 pro).
I have the following docker file:
# build environment
FROM node:12.13.0-alpine as build
WORKDIR /app
# ENV PATH /app/node_modules/.bin:$PATH
COPY package.json yarn.lock ./
RUN npm install --silent
COPY . /app
RUN npm run build
# production environment
FROM nginx:1.16.0-alpine
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Im still new to this and I might be wrong but after this build via:
docker build . -t myapp
and run it:
docker run -p 8080:80 myapp
visiting http://localhost:8080/ and expecting my files via dev tools i still see the following:
my files are still exposed.
What am I missing? Thought that the production build would not show everything?