P
P
Pavel Novikov2018-09-10 11:33:30
Docker
Pavel Novikov, 2018-09-10 11:33:30

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

3 answer(s)
S
samizdam, 2018-09-10
@samizdam

Mount the source directory via volume. And in the container already collect and run.

S
s4kro, 2018-09-10
@s4kro

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.

K
Kirill Kudryavtsev, 2018-09-10
@Deissh

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 question

Ask a Question

731 491 924 answers to any question