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
$ 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
|
|
or
|
|
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
|
|
delete dangling images
https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes