S
S
sokolnikov2015-06-06 16:41:54
Software Deployment
sokolnikov, 2015-06-06 16:41:54

How to properly use docker during development?

So so. I learned how to use docker for deployment to production.
When deploying, I build a working image based on a pre-prepared base image, when building the image, the fresh sources of my application from the repository are pulled into the image, and the environment is configured as I need. Well, then, based on this image, the container starts.
But the question arose, how to use docker (to have exactly the same working environment) at the development stage? I write in PHP.
And it turns out quite inconvenient:
- write a few lines of code;
- commit;
- push to the repository;
- rebuild a new image;
- restart the container;
- check the work.
Then add a couple more lines, and everything is new?
Or are there more logical solutions? Who is using it? If you use the VOLUME directive, please tell us about your use case.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Mironyuk, 2015-06-22
@serieznyi

In our company, we are just starting to transfer our projects to the docker architecture, but in the development process we have been using docker for quite some time. In particular, we use docker-compose for more convenient container management. Project sources are forwarded to php and nginx containers using volumes.
Come out something like this
the new development architecture is just being mastered, there is nothing yet in terms of testing and integration.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question