This image builds typescript react app created by react-scripts --template typescript and hosts it using nginx.
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;"]
Content type
Image
Digest
Size
8.6 MB
Last updated
about 6 years ago
docker pull yaroslaww1/react-nginx-frontend