write dockerfile
Dockerfile content
1 run is a 1-layer file layer, pay attention to cleaning up unnecessary installation packages.
From nginx RUN echo 'hello123' > /usr/share/nginx/html/index.html \ && echo '123' #&& apt-get install -y $buildDeps #&& apt-get purge -y --auto-remove $buildDeps
create image
docker build -t nginx:v3 .