How to launch a Docker container that i've got from another person?

I am a Docker-newbie and I’ve got a project from another developer including a Dockerfile. This shall give me the Virtual Machine to continue work with the (nodeJS-) project inside this project folder.

Docker is already installed on my machine.
How can I launch this container now?

  • mounting local home directory in Rstudio docker?
  • Docker container apt-get install can't find package
  • How to add user with dockerfile?
  • Marathon With Private Docker Repo
  • Mount volume to Docker image on OSX
  • Docker cache confusion
  • I’ve read about a command

    sudo docker run -name my_first_instance
    

    but i can’t find any container name in the Dockerfile.

  • systemtap:while resolving probe point: identifier 'process' at source: probe process().function no match
  • docker base image: how to upgrade
  • WordPress 4.8 on Docker REST API Not Accessible
  • How do I access Windows eventlog of a Docker container
  • OpenStack with Docker fails to spawn instances
  • Docker root folders on Windows location
  • 2 Solutions collect form web for “How to launch a Docker container that i've got from another person?”

    The dockerfile will create an image for you that you can launch containers from. this being said , Follow this:

    Create a folder.

    Copy dockerfile in the folder

    cd into the folder execute the following command:

    docker build -t <your desired image name> .
    

    This will create an image using directives in the dockerfile in the current folder.

    Now launch a container from the image.

    docker run -d --name <your container name> <imagename from previous step> <optional startup commands>
    

    Useful docker commands:

    You can expose ports in the previous command using -p switch.

    You can list Images via docker images

    You can list running containers via docker ps

    you can list running + exited containers via docker ps -a

    have a look at

    https://hub.docker.com/_/node/

    it is the official repository for NodeJS docker images

    If you want some docker images based on NodeJS, you will need to pull them docker pull my_node_image

    Then you can launch one with such a command

    docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app -w /usr/src/app node:4 node your-daemon-or-script.js

    The Dockerfile is just the recipe to build a docker image, for Nginx, Mysql, MongoDb, Redis, WordPress, Spotify, atop, htop…

    If docker images shows nothing, it means you have not yet pulled any docker image.

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