basic commands
docker info
docker pull
docker images
docker rmi
docker rm
docker history
docker run
docker build
# for running container,docker ps
docker commit container_hash tag:version
docker ps
docker exec -it container_hash /bin/bash
docker save -o archive.tar docker_img_hash
docker load -i archive.tar
docker run -it -v local_dir:docker_dir docker_img_hash /bin/bash
docker hub https://hub.docker.com/
- docker 变量
- ENV DEBIAN_FRONTEND noninteractive
- ARG BASE_PATH=/opt/data1/dw_dm
- RUN
- install package in docker env: apt-get update first!!!
- dockerfile
FROM ubuntu
RUN apt-get update && apt-get install vim git tree gcc -y
FROM gcc
RUN apt-get update && apt-get install vim git tree -y