Get the App
SLTechnology News&Howtos  ›  Servers  › 

10 minutes to learn Dockerfile

Shulou Source: shulou.com Published: 2022-06-03 09:00:34 12月06日 Update

Dockerfile example

Dockerfile is a mirror description file that contains instructions, each of which builds a layer, so the content of each instruction is to describe how the layer should be built. Basic structure of Dockerfile:

The basic image maintainer information image build instruction container executes the instruction FROM node:8LABEL maintainer= "Jext Community, https://github.com/rickding/HelloDocker"# copy filesCOPY." / usr/node/WORKDIR / usr/node/# launch serviceCMD ["node", "hello.js"] EXPOSE 8010Dockerfile common instructions

Tags: Instructions mirrors information content basics containers that is commonly used files bars examples structures maintainers Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia OPPO Reno macOS vpn Microsoft