Docker Tutorial | Creating custom Docker Images | Web Development | DevOps | Cloud-Native



Published
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝


Dockerfile
Docker is a basically a text file, it contains some set of instructions.
Automation of Docker image creation.
Docker Components
FROM:
For base image, this command must be on the top of dockerfile
RUN:
To execute commands, it will create a layer in image.
MAINTAINER:
Author/Owner/Description
COPY:
Copy files from local system(docker VM), we need to provide source destination(We can't download file from internet and any remote repo)
ADD:
Similar to COPY but, it provides a feature to download files from internet, also we extract file at docker image side.
EXPOSE:
To expose ports such as port 8080 for tomcat, port 80 for nginx etc.
WORKDIR:
To set working directory for a container
CMD:
Execute commands but during container creation.
ENTRYPOINT:
Similar to CMD, but has higher priority over CMD, first commands will be executed by ENTRYPOINT only.
ENV:
environment variables.
ARG:
to define the name of a parameter and its default value.

IGNORE:

#programming #webdesign #code #web #development #computer #programming #coding #python #security #developer #java #software #webdevelopment #webdeveloper #javascript #programmer #html #robotics #computerscience #coder
Category
Web design
Be the first to comment