Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update .md file #75

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion Docker/Dockerfile_Instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,44 @@ DockerFile

- `SHELL` - The SHELL instruction allows the default shell used for the shell form of commands to be overridden.


- ************************************************************************************************************************

- Dockerfile Instructions:

- FROM:
- RUN:
- CMD:
- ENTRYPOINT:
- WORKDIR:
- COPY:
- ADD:
- EXPOSE:
- ENV:

{ Using the steps in the above dockerfile, we will need to Install tomcat on Centos}:
- FROM: Pull centos from dockerhub
- RUN: Install java
- RUN: Create /opt/tomcat directory
- WORKDIR: Change work directory to /opt/tomcat
- ADD/RUN: Download tomcat packages (If you use RUN then you have to use wget command) and if we ADD then we can just use link address and specify location to copy mostly current directory.
- RUN: Extract tar.gz file
- RUN: Rename to tomcat directory
- EXPOSE: Tell to Docker that it runs on port 8080
- CMD: Start tomcat services

{
{Please make sure you pay Special attention to the version on ADD apache-tomcat version, RUN tar -xvzf and RUN mv}
- FROM centos:latest
- RUN cd /etc/yum.repos.d/
- RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
- RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
- RUN yum install java -y
- RUN mkdir /opt/tomcat
- WORKDIR /opt/tomcat
- ADD https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.70/bin/apache-tomcat-9.0.70.tar.gz .
- RUN tar -xvzf apache-tomcat-9.0.70.tar.gz
- RUN mv apache-tomcat-9.0.70 /opt/tomcat
- EXPOSE 8080
- CMD ["/opt/tomcat/bin/catalina.sh", "run"]
}
}