For development, you can do theses things : 1) Keep the container awake with a non-stop command ( ex: CMD tail -f /dev/null)
FROM python:3.9.0 ... COPY requirements.txt /data/requirements.txt RUN pip install -r requirements.txt COPY . . # Keep the container awake CMD tail -f /dev/null
2) Bind a volume on your container (with docker-compose.yml)
version: "3" services: app: build: context: . dockerfile: Dockerfile.local volumes: - .:/data/ environment: - TZ=Europe/Paris ports: - "8000:8000" networks: - default
3) Use a development server with hot-reloader (runserver for Django, run for flask, react-scripts start for Reactjs, etc)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
For development, you can do theses things :
1) Keep the container awake with a non-stop command ( ex: CMD tail -f /dev/null)
2) Bind a volume on your container (with docker-compose.yml)
3) Use a development server with hot-reloader (runserver for Django, run for flask, react-scripts start for Reactjs, etc)