Sign inSign up

yaroslaww1/react-nginx-frontend

By yaroslaww1

•Updated about 6 years ago

Image
0

135

yaroslaww1/react-nginx-frontend repository overview

⁠About

This image builds typescript react app created by react-scripts --template typescript and hosts it using nginx.

⁠Folder structure

  • /src - source code
  • /public - public folder
  • /nginx - contains nginx.conf
  • /build - will be created and hosted via nginx

⁠Source

FROM node:13.12.0-alpine as build

WORKDIR /app

COPY package.json ./ COPY package-lock.json ./ COPY tsconfig.json ./

RUN npm install RUN npm install [email protected] -g RUN npm install -g typescript@^3.8

COPY . .

RUN npm run build

FROM nginx:1.17.4-alpine COPY --from=build /app/build /usr/share/nginx/html COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]

Tag summary

Content type

Image

Digest

Size

8.6 MB

Last updated

about 6 years ago

docker pull yaroslaww1/react-nginx-frontend