Skip to content

Commit 5e45599

Browse files
committed
ist commit
0 parents  commit 5e45599

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
# MAINTAINER [email protected]
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

ansible.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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

docker.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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)

0 commit comments

Comments
 (0)