- 安裝 docker/docker-compose
sudo apt-get update
sudo apt-get remove docker docker-engine docker.io
sudo apt install docker.io -y
sudo service docker start
- docker-compose 最新版安裝請參考官網說明
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
- 讓目前登入的使用者可以使用 docker
sudo usermod -aG docker $USER
- 讓 docker 在重新開機時啟動
sudo systemctl enable docker
- 安裝 phpredisadmin via docker
sudo vi docker-compose.yml
phpredisadmin:
image: erikdubbelboer/phpredisadmin:latest
container_name: phpredisadmin
restart: always
environment:
- ADMIN_USER=admin #登入名稱
- ADMIN_PASS=admin #登入密碼
- REDIS_1_HOST=localhost #登入位置
- REDIS_1_PORT=6379
- REDIS_1_DATABASES=16 #如果是使用 Amazon ElastiCache 需要特別指定
ports:
- "9999:80" #本機port 對應 container port