Skip to content

Is this a bug??? I had to do something unusual with my Dockerfile.dev and docker-compose.yaml to get v2 working in Docker and it feels offΒ #17820

@ohmeow

Description

@ohmeow

What happened?

So its been awhile since i've spun up quasar within docker for local development. After battling things for a few hours ... this is what I came up with. But I'm wondering ... is there a better way (and why in the hell do i have to include index.html for things to work :))?

Dockerfile.dev:

FROM node:22-alpine
WORKDIR /app

# install project dependencies
COPY package*.json quasar.config.ts .npmrc index.html  ./
RUN npm i

# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .

# configre default/required environmental variables
ENV PATH /app/node_modules/.bin:$PATH

CMD ["npx","quasar", "dev"]

docker-compose.dev.yaml

...
frontend:
    container_name: gp-frontend-vue
    image: gp/frontend-vue:latest
    pull_policy: never
    env_file:
      - .env
    build:
      context: ./frontend-vue
      dockerfile: Dockerfile.dev
    volumes:
      - ./frontend-vue:/app:cached
      - /app/node_modules
    ports:
      - "8080:8080"
      - "9229:9229"
    environment:
      - NODE_ENV=development
    command: ["npx", "quasar", "dev", "-p", "8080"]
...

If anyone has any thoughts on how to improve this I'd love to hear. Thanks much!

What did you expect to happen?

I expect this to be sufficient in my Dockerfile.dev:

FROM node:22-alpine
WORKDIR /app

# install project dependencies
COPY package*.json   ./
RUN npm i

# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .

# configre default/required environmental variables
ENV PATH /app/node_modules/.bin:$PATH

CMD ["npx","quasar", "dev"]

Reproduction URL

NA

How to reproduce?

N/A

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)

Platforms/Browsers

Chrome

Quasar info output

Relevant log output

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions