my base python image

https://gitlab.com/modle13/docker-python https://docs.docker.com/get-started/part2/

extra flags

https://docs.docker.com/engine/reference/commandline/images/#format-the-output –format and –filter

pushing to dockerhub

https://ropenscilabs.github.io/r-docker-tutorial/04-Dockerhub.html https://hub.docker.com/r/modle/apythonapp/

base ubuntu with apt-get update/install

https://docs.docker.com/develop/develop-images/baseimages/#create-a-simple-parent-image-using-scratch

$ docker run –rm -it -v $PWD:/build ubuntu:16.04 container# apt-get update && apt-get -y install build-essential

(-it is interactive terminal, probably)

nginx and stuff

1
docker run ubuntu bash -c "apt-get -y install nginx" 

or

https://www.digitalocean.com/community/tutorials/how-to-run-nginx-in-a-docker-container-on-ubuntu-14-04

1
2
docker pull nginx
docker run --name docker-nginx -p 80:80 nginx

basic nginx test

docker container stop docker-nginx docker container rm docker-nginx TEST_PATH="$HOME/projects/docker-nginx/html” mkdir -p $TEST_PATH echo ‘some html’ > $TEST_PATH/index.html docker run –name docker-nginx -p 80:80 -d -v $TEST_PATH:/usr/share/nginx/html nginx

DO_NGINX_PATH=$HOME/projects/docker-nginx docker run –name docker-nginx -p 80:80 -v $TEST_PATH:/usr/share/nginx/html -v $DO_NGINX_PATH/default.conf:/etc/nginx/conf.d/default.conf -d nginx

Making a lua-supported image https://stackoverflow.com/a/47366415/1028844

more base image stuff

https://docs.docker.com/develop/develop-images/baseimages/

netstat in ubuntu 16 container

https://stackoverflow.com/a/41961473/1028844

last 2 commands blow away the apt-get repo

RUN apt-get update
&& DEBIAN_FRONTEND=noninteractive apt-get install -y
net-tools
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*

publish exposed ports and other networking stuff

docker run -P my_app

https://www.ctl.io/developers/blog/post/docker-networking-rules/

build an image from an existing image

at top of Dockerfile

1
FROM someimage

delete dangling images

https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes