How I use a local container in a swarm cluster

A colleague find out Docker and want to use it for our project. I start to use Docker for test. After reading an article about Docker swarm I want to test it.

I have installed 3 VM (ubuntu server 14.04) with docker and swarm. I followed some How To ( and My cluster work. I can launch for exemple a basic apache container (the image was pull in the Docker hub) but I want to use my own image (an apache server with my web site).

  • Docker daemon unable to find the dockerfile
  • Can run ARM/rpi images in Docker on Windows but not linux
  • Running linux container on docker windows
  • ehcache and multicast failing on docker
  • How to allow websockets to specific subdomain behind an nginx proxy?
  • docker container port format does not looks right(like <port>-<port>)
  • I tested to load an image (after save it in a .tar) but this option isn’t supported by the clustering mode, same thing with the import option.

    So my question is : Can I use my own image without to push it in the Docker hub and how I do this ?

  • Limit GPU usage in nvidia-docker?
  • How to run install pip requirements from private repo in google cloud source?
  • Docker Registry v2 Images cannot be removed
  • Wildfly/Jboss-v10 is not working in cluster mode with docker swarm
  • maven-release-plugin automatically run a script before commit
  • connect to docker's running container
  • One Solution collect form web for “How I use a local container in a swarm cluster”

    If your own image is based on a Dockerfile that you build you can execute the build command on your project while targeting the swarm.

    However if the image wasn’t built, but created manually you need to have a registry in between that you can push to, either docker hub or some other registry solution like

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.