Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Copy Not working #6505

Closed
1 task done
Fosol opened this issue Apr 30, 2020 · 3 comments
Closed
1 task done

Docker Copy Not working #6505

Fosol opened this issue Apr 30, 2020 · 3 comments

Comments

@Fosol
Copy link

Fosol commented Apr 30, 2020

  • I have tried with the latest version of my channel (Stable or Edge)
  • [x ] I have uploaded Diagnostics
  • Diagnostics ID: 059FF108-F0DE-4206-BEB3-8E9E4F971B51/20200430042742

Expected behavior

docker-compose should copy files to container. It is working for all my co-workers. I have the exact same branch as they do.

This was a slow progression to issues. I was finding more and more often that my frontend container was having issues. Sometimes I'd just remove the volume and it would work again. Other times I had to restart Docker Desktop. Now nothing works. It refuses to let my frontend work. Oddly enough all my other containers continue to work fine. I've double/triple checked that my files are identical to other team members.

Actual behavior

Source files are not being copied to the container.

Information

  • Windows Version: Latest 10.0.18363
  • Docker Desktop Version: Latest 2.2.0.5
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: No

Steps to reproduce the behavior

  1. Create React App (using Typescript) here /frontend
  2. Source here /frontend/src
  3. docker-compose here /docker-compose.yml
  4. Dockerfile here /frontend/Dockerfile

docker-compose.yml

version: "3.5"

services:
  ####################### Frontend #######################
  frontend:
    stdin_open: true
    tty: true
    restart: on-failure
    container_name: frontend-app
    build:
      context: frontend
    volumes:
      - ./frontend/src:/usr/app/src
      - ./frontend/public:/usr/app/public
      - frontend-node-cache:/usr/app/node_modules
    ports:
      - "3000:3000"
    env_file: ./frontend/.env
    networks:
      - pims

####################### Networks Definition #######################
networks:
  pims:
    name: pims-net
    driver: bridge

####################### Volumes Definition #######################
volumes:
  frontend-node-cache:

Dockerfile

  • Please note that I've commented out the npm start so that I can bash into the container to look at the files.
FROM node:10-slim as node

# install build toolchain (for node-gyp)
RUN apt-get update \
  && apt-get install --no-install-recommends -y dumb-init python build-essential \
  && rm -rf /var/lib/apt/lists/*

# set entrypoint to `dumb-init` as it handles being pid 1 and forwarding signals
# so that you dont need to bake that logic into your node app
ENTRYPOINT ["dumb-init", "--"]

WORKDIR /usr/app

# install a specific NPM version
RUN npm install -g npm@6.9.0

COPY package*.json ./

RUN npm set progress=false \
  && npm ci

COPY . .

# webpack-dev-server (3000)
EXPOSE 3000

# CMD ["npm", "start"]
CMD tail -f /dev/null
@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@Fosol
Copy link
Author

Fosol commented Jul 29, 2020

I installed an older version of Docker Desktop and stopped upgrading. Haven't had issues since.

@Fosol Fosol closed this as completed Jul 29, 2020
@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Aug 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants