Skip to content

Instantly share code, notes, and snippets.

@goeroeku
Last active July 23, 2019 23:22
Show Gist options
  • Save goeroeku/d8968d8fd2ec76d1ee553ba98fdf1c56 to your computer and use it in GitHub Desktop.
Save goeroeku/d8968d8fd2ec76d1ee553ba98fdf1c56 to your computer and use it in GitHub Desktop.
All about Docker & Ranches on Manjaro

Docker

a. Install Docker

sudo pacman -S docker docker-machine docker-compose

b. Jalankan Service

sudo systemctl start docker

c. Tambahkan current user ke group docker agar pada saat menjalankan tidak perlu menggunakan sudo

sudo usermod -aG docker ${USER}

Ranches

a. Install Ranches

docker run --name rancher-server -d --restart=always -p 8080:8080 rancher/server

b. Menambahkan host 1 dan verifikasi docker agent Pastikan setelah install Ranches, yang digunakan oleh Ranches Server adalah IP yang digunakan oleh running Docker, ex: 172.17.0.1. Jangan menggunakan ip 127.0.0.1 or localhost. Jika masih menggunakan localhost, silakan ganti pada menu Admin > Settings

c. Mengaktifkan OAuth Apps Github Buka Admin > Access Control, lihat bagian github.

Troubleshoot

a. Node system rancher tidak running (healcheck, net, dns dll) Check logs dari rancher/agent

docker logs <containerid>

jika muncul error resolv.conf, kemungkinan karena host os menggunakan dnsmasq, cara checknya

ps aux | grep dnsmasq

Solusinya: https://rancher.com/docs/rancher/v1.6/en/faqs/agents/#reference-to-localhost-present-in-etcresolvconf

ref :

@goeroeku
Copy link
Author

@goeroeku
Copy link
Author

you can use :
volumes_from to share directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment