File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM centos:latest
2
+
3
+ RUN yum install -y httpd \
4
+ zip\
5
+ unzip
6
+ ADD https://www.free-css.com/assets/files/free-css-templates/download/page254/photogenic.zip /var/www/html/
7
+ WORKDIR /var/www/html/
8
+ RUN unzip photogenic.zip
9
+ RUN cp -rvf photogenic/* .
10
+ RUN rm -rf photogenic photogenic.zip
11
+ CMD ["/usr/sbin/httpd" , "-D" , "FOREGROUND" ]
12
+ EXPOSE 80
13
+
14
+
15
+ # FROM centos:latest
16
+
17
+ # RUN yum install -y httpd \
18
+ # zip\
19
+ # unzip
20
+ # ADD https://www.free-css.com/assets/files/free-css-templates/download/page265/shine.zip /var/www/html/
21
+ # WORKDIR /var/www/html/
22
+ # RUN unzip shine.zip
23
+ # RUN cp -rvf shine/* .
24
+ # RUN rm -rf shine shine.zip
25
+ # CMD ["/usr/sbin/httpd", "-D", "FOREGROUND"]
26
+ # EXPOSE 80
Original file line number Diff line number Diff line change
1
+ - hosts : all
2
+ tasks :
3
+ - name : stop container
4
+ shell : docker container stop mydockercontainer
5
+ - name : remove container
6
+ shell : docker container rm mydockercontainer
7
+ - name : remove docker image
8
+ shell : docker image rmi vikashashoke/docker_image
9
+ - name : create new container
10
+ shell : docker container run -itd --name mydockercontainer -p 9000:80 vikashashoke/docker_image
Original file line number Diff line number Diff line change
1
+ - hosts : all
2
+ tasks :
3
+ - name : stop container
4
+ shell : docker container stop rockstar-container # name of container
5
+ - name : remove container
6
+ shell : docker container rm rockstar-container
7
+ - name : remove docker image
8
+ shell : docker image rm vikashashoke/docker-job # name of images (docker images)
9
+ - name : create new container
10
+ shell : docker container run -itd --name rockstar-container -p 9000:80 vikashashoke/docker-job # (docker-job>> name of jenkins job)
You can’t perform that action at this time.
0 commit comments