Nginx image for serving static build content from react, vue and other html sources
3.6K
This image can be used with multiple methods
docker run --name=web --restart=always -v `pwd`:/usr/share/nginx/html -p 8080:80 hereshem/nginx
version: "3"
services:
web:
image: hereshem/nginx
ports:
- "8080:80"
restart: always
volumes:
- ./:/usr/share/nginx/html
FROM node:14 AS build
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build
# production stage
FROM hereshem/nginx:latest as prod
COPY --from=build /app/dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]
Content type
Image
Digest
Size
9.6 MB
Last updated
over 4 years ago
docker pull hereshem/nginx