Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
Load-Balancer-Docker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mohammad.salama
Load-Balancer-Docker
Commits
499f67d1
Commit
499f67d1
authored
Mar 13, 2024
by
mohammad.salama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the main difference between CMD and ENTRYPOINT is added
parent
7c0b4514
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
Read Me.txt
Read Me.txt
+14
-0
No files found.
Read Me.txt
0 → 100644
View file @
499f67d1
ENTRYPOINT is the process that’s executed inside the container.
CMD is the default set of arguments that are supplied to the ENTRYPOINT process.
CMD is easily overridden by appending your own arguments to the docker run command.
when wwe don't use ENTRYPOINT , it is set to default value : /bin/sh -c
so it is very important in many scenarios:
let's say we have an image in a certain directory there is the application we want to start.
each application has a unique argument(s) to pass (port number , credentials , commands ...)
then we set entry point to the path of the app to start it (execute it).
then in cmd we specify the arguments we want to pass.
so if we need to change the arguments according to our needs we only need to modify them in the 'docker run' command.
which makes the containers more flexible.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment