You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
The frontend service uses beevelop/ionic as its base image. The issue is, that this base image size is 3.39 GB, it comes with unnecessary dependencies such as Cordova and Android.
We can use a relatively much smaller base image, consisting of only node, for example, you can use node:14.15.5-alpine3.13 which has the size of roughly only 40 MB, and then install the ionic CLI dependency.
An example alternative Dockerfile would be
## BuildFROM node:14.15.5-alpine3.13 as build
# Create app directoryWORKDIR /usr/src/app
# Install app dependencies# A wildcard is used to ensure both package.json AND package-lock.json are copiedCOPY package*.json ./
RUN npm ci
RUN npm install -g @ionic/cli
# Bundle app sourceCOPY . .
RUN ionic build
## Run FROM nginx:alpine
#COPY www /usr/share/nginx/htmlCOPY --from=build /usr/src/app/www /usr/share/nginx/html
The text was updated successfully, but these errors were encountered:
Hello,
The frontend service uses beevelop/ionic as its base image. The issue is, that this base image size is
3.39 GB
, it comes with unnecessary dependencies such as Cordova and Android.We can use a relatively much smaller base image, consisting of only node, for example, you can use
node:14.15.5-alpine3.13
which has the size of roughly only 40 MB, and then install the ionic CLI dependency.An example alternative Dockerfile would be
The text was updated successfully, but these errors were encountered: