skip to Main Content

I have a container that has a wordpress website and one with MySQL, I need to share this docker with a friend of mine so that he and I have the same development environment. How would it be possible to do this?

I imagine it’s something similar to docker load and docker import

3

Answers


  1. Subscribe hub.docker.com and use your repository to share images.
    More informations: https://docs.docker.com/docker-hub/quickstart/

    Login or Signup to reply.
  2. Here is an alternative to the better Docker Hub solution:

    Image Export

    docker export EXPORT_NAME | gzip > EXPORT_NAME.gz
    

    Image Import

    zcat EXPORT_NAME.gz | docker import - EXPORT_NAME
    

    After that you have, by the docker run command, to crate the container.

    I suggest you to use external volumes mapping in order to GZIP and export containers data too.

    Login or Signup to reply.
  3. Since you’re both developers, I’d share the code rather than images. If you both have the code, Dockerfiles and docker-compose files, you can build the containers on your machines.

    Use Github or something similar to share the code.

    Sharing the images would be a good solution if one of you were a developer and the other weren’t.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search