-
Notifications
You must be signed in to change notification settings - Fork 0
Docker
Xu Gang edited this page Jan 28, 2021
·
1 revision
# build image from dockerfile.
docker build -t xug15/bash:1.0.0 -f ./Dockfile ./
# star one container and remove when you stop it. (testing)
docker run --rm -dt bioinfo_tsinghua
# star one container.
docker run -dt bioinfo_tsinghua
docker load -i ~/Desktop/bioinfo_tsinghua.docker.tar.gz # only if Mac or Windows 10 Pro
docker load -i ~/Desktop/bioinfo_tsinghua.tar.gz # Otherwise
# docker start a images
docker run --name=bioinfo_tsinghua -dt --restart unless-stopped -v ~/Desktop/bioinfo_tsinghua_share:/home/test/share bioinfo_tsinghua # get into a container.
docker exec -it bioinfo_tsinghua bash
# save container.
docker commit d1b2f0bf23e8 gangxu/coexpression:1.1
docker run --name coexp -dt -v /Users/xugang/Documents/c-pycharm/git/docker/data:/home gangxu/coexpression:1.1
docker exec -it coexp bash
# save
docker save myimage:latest | gzip > myimage_latest.tar.gz
# tag
docker tag bioinfo_tsinghua:latest gangxu/bioinfo_tsinghua:latest
docker images gangxu/bioinfo_tsinghua:latest
REPOSITORY TAG IMAGE ID CREATED SIZE
runoob/ubuntu v3 4e3b13c8a266 3 months ago 136.3 MB
# push
docker push gangxu/bioinfo_tsinghua:latest
Xu Gang m13001271022 [at] 163.com Tsinghua University