Dockerfile的实践2

Dockerfile的文件

FROM ubuntu
RUN apt-get update && apt-get install -y stress
ENTRYPOINT ["/urs/bin/stress"]
CMD []

根据Dockerfile新build一个image

docker build -t soymilk/stress .

这样我们就可以在命令行这样做

docker run -it soymilk/stress --vm 1 --verbose
原文地址:https://www.cnblogs.com/soymilk2019/p/11548621.html