I am new to docker, and I am trying to run my Svelte project with docker.
This is my
version: '3.8' services: app: build: . ports: - '3000:3000' volumes: - '.:/usr/src/app' - 'node_modules:/usr/src/app/node_modules' volumes: node_modules:
FROM node:14-alpine WORKDIR /usr/src/app COPY package*.json ./ RUN npm install COPY . . EXPOSE 3000 CMD ["npm", "start"]
This goes well on my Macbook, but it is not working on my Windows desktop. What is the reason?
And I solved this problem with fixing
docker-compose.yml like this:
version: '3.8' services: app: build: . ports: - '3000:3000' volumes: - '.:/usr/src/app' - '/usr/src/app/node_modules'
What is the difference between this code and previos
Source: Docker Questions