![]() Successfully tagged execution of the above command is showing a success for building a docker image. ![]() Removing intermediate container 8d43600ffdd8 Step 3/3 : LABEL Remarks="This is a dockerfile example for Centos system" Removing intermediate container f2e33e07a7ee Status: Downloaded newer image for centos:7 It is a specific command for building docker image from the ‘Dockerfile’ file description docker build -t centos:7. LABEL Remarks=”This is a dockerfile example for Centos system”īuilding CentOS Docker Image using the reference from DockerfileĪfter creating the necessary file describing for the CentOS docker image build process, execute the following command. Using the above content’s pattern, the following is the example of a Dockerfile content : There is also another label for number but just keep it short to avoid for giving unnecessary labels. There is an attribute of the reserved keyword ‘LABEL’ and it is the ‘Remarks’ one. The maintainer name and even the email contact for that maintainer.Ĭontinue on the next line, it is the reserved keyword of LABEL. It is only giving information about the maintainer of docker image. The next line, the reserved keyword syntax is the MAINTAINER. There can be another base image besides centos, it can be for example ubuntu:16.04, etc. Furthermore, it will actually use CentOS with a specific version. In the context of the above docker image build description, it will use ‘centos’ as its base image. This syntax, FROM is very useful to inform docker to build the image from a certain base image. ![]() In the above content, the next line has a reserved keyword syntax of ‘FROM’. It is informing that the following syntax is for getting base image of CentOS. The first line as the content of the Dockerfile, it is just a normal comment or remark. The content of that file is available as follows : Just create a file with the name of ‘Dockerfile’. The following is the steps for building CentOS docker image using the file with the name of ‘Dockerfile’. Creating Dockerfile for Building CentOS Docker Image ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |