Skip to content

Deea222/docker-practice

 
 

Repository files navigation

docker-practice

Docker image with python 2.7.13 + python 3.6.0 + mongodb 3.2. It's based on Alpine Linux 3.5.

Instructions

# Build image
sudo docker build -t docker-practice .

# Run image with psuedo-tty being attached to the screen
sudo docker run \
    --interactive --tty \
    --publish 12345:27017 \
    --volume /srv/docker-practice/db:/data/db \
    --rm --name docker-practice docker-practice

# Run image as a daemon
sudo docker run \
    --detach \
    --publish 12345:27017 \
    --volume /srv/docker-practice/db:/data/db \
    --rm --name docker-practice docker-practice

# Attach to the running docker image
sudo docker exec -it docker-practice /bin/sh

# Stop running docker container
sudo docker stop docker-practice
References

Why would you do this? Why don't you just separate them into different containers?

A picture of widowmaker from Overwatch Animated Shrot, "Alive"

(laughs)



docker-practice is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0). See COPYRIGHT for details.

About

My Dockerfile practice

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%