Skip to content

Instantly share code, notes, and snippets.

@xionglun
Last active April 23, 2018 07:33
Show Gist options
  • Save xionglun/36ef49d002ee4512bde5a3e36f40b147 to your computer and use it in GitHub Desktop.
Save xionglun/36ef49d002ee4512bde5a3e36f40b147 to your computer and use it in GitHub Desktop.
Docker Usage
FROM alpine
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk update \
&& apk --no-cache --no-progress add \
bash \
make \
wget \
git \
lua \
luajit \
python \
python3 \
nodejs \
vim \
go
EXPOSE 8080
EXPOSE 80
CMD ["/bin/bash"]

Docker 常用命令

# 1. 删除所有无用Docker镜像
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)

# 2. 删除所有无用的volume
docker volume ls -qf "dangling=true" | xargs docker volume rm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment