M
M
Midas162019-10-15 13:50:06
Web development
Midas16, 2019-10-15 13:50:06

Is it possible to package a project on docker compose into a docker image?

I recently took up learning docker and ran into this problem
There is a project that is deployed to docker using docker compose
3 services are deployed
And only one of them, using a dockerfile
The rest of the standard images
How can all this be packaged and sent to another machine? In addition to the archive, is this somehow done with standard docker tools?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Oleg, 2019-10-15
@Midas16

Upload the project to the git repository.
Install `git`, `docker`, `docker-compose`
on another machine Clone the repository on another machine.
Collect, run containers.

M
Mikhail Vasilyev, 2019-10-15
@vasilyevmn

https://docs.docker.com/engine/reference/commandli...
https://docs.docker.com/engine/reference/commandli...
Something like this:

docker commit <имя образа> <название image>
docker save <название image> > /tmp/save.tar
scp /tmp/save.tar [email protected]:/tmp/save.tar
---
docker load < /tmp/save.tar
docker run <имя образа> <название image>

I
Igor, 2019-10-15
@DMGarikk

you can also smoke this thing
https://github.com/tiangolo/docker-with-compose
is not quite right, but it seems to me that on the basis of it you can implement what you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question