From c484894002aa116d0e90ecf6139d0a5c4879e6aa Mon Sep 17 00:00:00 2001 From: bernard Date: Fri, 24 Feb 2023 11:34:31 -0600 Subject: [PATCH 1/3] Modified Dockerfile_Instructions.md file --- Docker/Dockerfile_Instructions.md | 42 ++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/Docker/Dockerfile_Instructions.md b/Docker/Dockerfile_Instructions.md index 463d4474..8322b120 100644 --- a/Docker/Dockerfile_Instructions.md +++ b/Docker/Dockerfile_Instructions.md @@ -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 at tention 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"] +} +} From 4b00d54697844cc4b34731590d97c1cd1729ec43 Mon Sep 17 00:00:00 2001 From: bernard Date: Fri, 24 Feb 2023 11:40:55 -0600 Subject: [PATCH 2/3] Modified Dockerfile_Instructions.md file --- Docker/Dockerfile_Instructions.md | 64 +++++++++++++++---------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/Docker/Dockerfile_Instructions.md b/Docker/Dockerfile_Instructions.md index 8322b120..30329514 100644 --- a/Docker/Dockerfile_Instructions.md +++ b/Docker/Dockerfile_Instructions.md @@ -80,40 +80,40 @@ DockerFile - 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 +- 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 at tention 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"] +- 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"] } } From 2f46d10f88d3b27bb9c18d7481ce1727eb26326a Mon Sep 17 00:00:00 2001 From: 8binny5 <43999482+8binny5@users.noreply.github.com> Date: Fri, 24 Feb 2023 11:43:04 -0600 Subject: [PATCH 3/3] Update Dockerfile_Instructions.md --- Docker/Dockerfile_Instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docker/Dockerfile_Instructions.md b/Docker/Dockerfile_Instructions.md index 30329514..04df4684 100644 --- a/Docker/Dockerfile_Instructions.md +++ b/Docker/Dockerfile_Instructions.md @@ -102,7 +102,7 @@ DockerFile - CMD: Start tomcat services { -{Please make sure you pay Special at tention to the version on ADD apache-tomcat version, RUN tar -xvzf and RUN mv} +{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-*