No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Anyone doing 2 stage docker build to reduce the image size?

    Help
    2
    2
    451
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mariaczi last edited by

      Guys,

      I would appreciate any help with reducing Docker image with my quasar app.
      At the moment my dockerfile-dev looks like that:

      FROM node:10-alpine
      ENV NODE_ENV development
      RUN yarn global add @vue/cli && yarn global add quasar-cli
      
      WORKDIR /srv
      EXPOSE 8080
      CMD quasar dev
      

      It is working nice, because together with the volumes set up in docker-compose I have nice hot reloading etc, but I am getting closer to first deployment and I can’t imagine sending/pulling 1.1gb image every time…

      As the result I have 1.2 GB image which is pretty bad… I suppose I would have to go for 2 stage build but I am not that docker expert to do that…

      1 Reply Last reply Reply Quote 1
      • nothingismagick
        nothingismagick last edited by

        why are you building quasar dev in your docker app? That is really for development only. If you want to reduce your size, just use the dist folder as your WORKDIR

        1 Reply Last reply Reply Quote 1
        • First post
          Last post