Answer the question
In order to leave comments, you need to log in
How to work with code in a Docker container?
I'm setting up my Docker environment and I can't figure out one thing - how do I edit the code in the container and upload it to github?
Let's say I made a container for a java application, configured it, built it and lifted it. How can I now upload the code there so that I can edit it in this container, run the application and commit the changes?
Answer the question
In order to leave comments, you need to log in
Mount the source directory via volume. And in the container already collect and run.
Or there is another option to do a COPY-task of the sources in the Dockerfile and drag them directly into the container. We carry scripts in python, then if you go through / bin / bash you can code in vi for example.
During the development process, you can mount the contents of the folder with the code, but after that, the container with the final version and fully working is still assembled.
Containers are for quick deployment, not development in them
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question