Skip to content

Commit

Permalink
feat: use smaller base image in FE
Browse files Browse the repository at this point in the history
Thanks to a suggestion by @nooreldeensalah I'll be making use of a smaller base image.

I hope the [Pr](udacity#56) gets merged for the next cohort
  • Loading branch information
elcharitas committed Oct 2, 2022
1 parent b0fe4f5 commit 84dba6a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions udagram-frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
## Build
FROM beevelop/ionic:latest AS ionic
FROM node:14.15.5-alpine3.13 as build
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
COPY package*.json ./
RUN npm ci
RUN npm install -g @ionic/cli
# Bundle app source
COPY . .
RUN ionic build
## Run
FROM nginx:alpine
#COPY www /usr/share/nginx/html
COPY --from=ionic /usr/src/app/www /usr/share/nginx/html
COPY --from=build /usr/src/app/www /usr/share/nginx/html

0 comments on commit 84dba6a

Please sign in to comment.