All posts in Docker

Cài docker CentOS 7

$ sudo yum install -y yum-utils device-mapper-persistent-data lvm2 $ sudo yum-config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo $ sudo yum install docker-ce -y $ sudo usermod -aG docker $(whoami) $ sudo systemctl enable docker.service $ sudo systemctl start docker.service $ sudo yum install epel-release -y $ sudo yum install -y python-pip $ sudo pip . . . Read more

Cài ioncube vào docker machine mới

docker exec -it vt65innocomvn /bin/bash cp /app/public/ioncube_loader_lin_7.0.so /usr/lib/php/20151012 apt-get install vim -y vi /etc/php/7.0/cli/php.ini zend_extension = /usr/lib/php/20151012/ioncube_loader_lin_7.0.so php -v

Remove dangling images & container

[sourcecode language=”powershell”] # Delete all stopped containers docker rm $( docker ps -q -f status=exited) # Delete all dangling (unused) images docker rmi $( docker images -q -f dangling=true) [/sourcecode]

Docker-compose.yml file để cài wordpress trên virtualhost

[sourcecode] version: "2" services: nginx-proxy: image: jwilder/nginx-proxy container_name: nginx-proxy ports: – "80:80" volumes: – /var/run/docker.sock:/tmp/docker.sock:ro – ./nginx:/etc/nginx/conf.d db: image: mariadb ports: – "8001:3306" volumes: – ./db:/var/lib/mysql environment: – MYSQL_ROOT_PASSWORD=secret phpmyadmin: image: phpmyadmin/phpmyadmin:latest ports: – "8002:80" links: – db:mysql environment: – MYSQL_ROOT_PASSWORD=secret – VIRTUAL_HOST=phpmyadmin.app – VIRTUAL_PORT=8002 wp: image: wordpress ports: – . . . Read more