Home > Archives > Docker image 结构

Docker image 结构

Publish:

file system

1
2
3
.
├── app.py
└── Dockerfile

app.py

1
print("hello world")

Dockerfile

1
2
3
FROM ubuntu:15.04
COPY app.py /app
CMD python /app/app.py

Command

1
2
3
4
5
docker build -t my_test_image .
docker save my_test_image > my_test_image
file my_test_image
mkdir unpacked_image
tar -xvf my_test_image -C unpacked_image

参考

声明: 本文采用 BY-NC-SA 授权。转载请注明转自: Ding Bao Guo