├── Dockerfile ├── LICENSE ├── README.md └── docker-compose.yml /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:alpine 2 | 3 | USER root 4 | RUN npm install -g @quasar/cli && \ 5 | npm install -g @vue/cli && \ 6 | npm install -g @vue/cli-init 7 | 8 | RUN mkdir /home/node/app 9 | 10 | # VOLUME [ "/home/node/app" ] 11 | WORKDIR /home/node/app 12 | 13 | CMD /bin/sh 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Scott 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # quasar-docker 2 | [WIP] Some docker stuff to run Quasar Framework in a Docker container. 3 | 4 | ## Instructions 5 | 6 | ### Add files to your project 7 | Add the `Dockerfile` and `docker-compose.yml` files to your project. If you don't have a project, add these files to an empty directory. 8 | 9 | ### Run the build command 10 | Run: 11 | 12 | `docker-compose build` 13 | 14 | This will build the container from the latest node alpine container image and set up the docker environment. 15 | 16 | ### Run the container 17 | Once the build has finished, run 18 | 19 | `docker-compose up -d`. 20 | 21 | This runs the container in detached mode. 22 | 23 | ### Enter the container via the shell entry 24 | Now to get into the container via the shell: 25 | 26 | `docker exec -ti sh` 27 | 28 | Replace `` with the name of your running container. 29 | If you don't know the name of your container, run 30 | 31 | `docker-compose ps` 32 | 33 | ### Run the Quasar dev server 34 | 35 | NOTE: if you didn't have a Quasar project already started, skip to the [Initializing a new project](#initializing-a-new-project) step. 36 | 37 | If you added the files to your project, once you've ran the `exec` command, you should be in `/home/node/app` 38 | 39 | Now enter 40 | 41 | `quasar dev` 42 | 43 | You should now see the normal CLI output to get the dev server running. The automatic opening of the browser won't work, so go to http://localhost:8080 in your favorite browser. 44 | 45 | ### Initializing a new project 46 | If you don't have a project already built, you can also do `quasar create -b dev` and start a new project. 47 | 48 | NOTE: the `-b dev` option will only be needed, while version 1 of Quasar is in beta status. 49 | 50 | ## Some caveats. 51 | - The webpack hot reload is now running only with polling. 52 | - The automatic opening of the browser won't work. You have to enter the dev server URL http://localhost:8080. 53 | 54 | ### That's it! 55 | Basically, this method of gaining shell access to the container means all Quasar CLI commands will (should) work. 56 | 57 | NOTE: This is currently alpha, so don't expect too much! Any testing greatly appreciated. :smile: 58 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | frontend: 4 | build: . 5 | ports: 6 | - "8080:8080" 7 | volumes: 8 | - .:/home/node/app:rw 9 | restart: "no" 10 | command: sh 11 | stdin_open: true 12 | tty: true 13 | environment: 14 | - CHOKIDAR_USEPOLLING=true 15 | --------------------------------------------------------------------------------