Create Docker Container and run - madhusudana30/AlternativeJPAForWebSphere GitHub Wiki

SAMPLE: Create Docker image from docker file.

Dockerfile filename is "Dockerfile"

  • Traditionally, the Dockerfile is called Dockerfile and located in the root of the context. You use the -f flag with docker build to point to a Dockerfile anywhere in your file system.

* $ docker build -f /path/to/a/Dockerfile .

Errors:

docker build -t hello . (. means DockerFile is exist in current directory)

Run Docker Image:

docker run hello

Load Docker Image offline:

sudo docker load -i ubuntu_image.docker*

  • https://docs.docker.com/engine/reference/commandline/load/

  • $ docker image ls

  • REPOSITORY TAG IMAGE ID CREATED SIZE

  • $ docker load < busybox.tar.gz

  • Loaded image: busybox:latest

  • $ docker images

  • REPOSITORY TAG IMAGE ID CREATED SIZE

  • busybox latest 769b9341d937 7 weeks ago 2.489 MB

  • $ docker load --input fedora.tar

  • Loaded image: fedora:rawhide

  • Loaded image: fedora:20

  • $ docker images

  • REPOSITORY TAG IMAGE ID CREATED SIZE

  • busybox latest 769b9341d937 7 weeks ago 2.489 MB

  • fedora rawhide 0d20aec6529d 7 weeks ago 387 MB