March 2018
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  

Categories

March 2018
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  

Start a docker container on CentOS at boot time as a linux service

Note: If docker daemon does not start at boot, you might want to enable the docker service

1 systemctl enabledocker.service

Here are the steps.

Create the file /etc/systemd/system/docker_demo_container.service

1 2 3 4 5 6 7 8 9 10 11 [Unit] Wants=docker.service After=docker.service [Service] RemainAfterExit=yes ExecStart=/usr/bin/dockerstart my_container_name ExecStop=/usr/bin/dockerstop my_container_name [Install] WantedBy=multi-user.target

Now I can start […]

docker install on centos 7.4

hostnamectl set-hostname clusterserver1.rmohan.com ifconfig -a vi /etc/selinux/config systemctl disable firewalld systemctl stop firewalld vi /etc/hosts yum install wget yum update yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo yum-config-manager –enable docker-ce-edge yum list docker-ce –showduplicates | sort -r yum install docker-ce

systemctl […]

disable directory browsing apache2.4

<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>

to

<Directory /var/www/> Options FollowSymLinks AllowOverride None Require all granted </Directory>