Apa Itu Docker?
Docker adalah platform open-source yang memungkinkan pengembang untuk mengemas, mendistribusikan, dan menjalankan aplikasi dalam wadah (container). Wadah Docker berisi semua yang dibutuhkan untuk menjalankan aplikasi, termasuk kode, dependensi, dan konfigurasi sistem, sehingga memastikan aplikasi berjalan konsisten di berbagai lingkungan.
Fungsi Docker
- Membantu Isolasi Aplikasi – Setiap aplikasi berjalan dalam container yang terpisah, sehingga tidak ada konflik antar aplikasi.
- Memudahkan Pengembangan & Deployment – Aplikasi bisa dengan mudah dikembangkan, diuji, dan dijalankan di berbagai platform tanpa khawatir perbedaan lingkungan.
- Meningkatkan Efisiensi dan Skalabilitas – Docker lebih ringan dibandingkan mesin virtual dan memungkinkan penggunaan sumber daya yang lebih optimal.
- Portabilitas – Aplikasi dalam container dapat berjalan di mana saja, baik di komputer lokal, server, maupun cloud.
- Memudahkan CI/CD (Continuous Integration & Deployment) – Docker sering digunakan dalam DevOps untuk otomatisasi proses deployment.
Install Remotely using Docker and NGinX Proxy Manager
First you'll need to have Docker-CE installed, on your desired host. If you want a fairly easy / safe way to also access your remotely server from outside your local network, you'll want to install and setup NGinX Proxy Manager in Docker as well.
See the following articles / Videos for instructions on setting thoe up.
Installing Docker-CE and Docker-Compose
You can easily install Docker-CE, Docker-Compose, Portainer-CE, and NGinX Proxy manager by using this quick install script I created and maintain on Github. Just use the command:
wget https://gitlab.com/bmcgonag/docker_installs/-/raw/main/install_docker_nproxyman.sh
To download the script to your desired host.
Change the permissions to make the script executable:
chmod +x ./install_docker_nproxyman.sh
and then run the script with the command:
./install_docker_nproxyman.sh
Simply enter 'y' for each thing you want to install.
At some point, you may be asked for your super user (sudo) password as well.
Allow the script to complete installation.
At this point, you might want to log out and back in, as this will allow you to use the docker
and docker-compose
commands without the need of sudo in front of them.
Once you've setup Docker and NGinX Proxy Manager (known as NPM from here on), you're ready to install Remotely via Docker.
Again in a terminal window enter the following command:
In the above command, you'll be running the container as a daemon (-d) so it doesn't stop running when you exit the command line interface (terminal / shell). You're telling the container to restart automatically unless you specifically stop it with the docker stop remotely
command, and you are mapping port 5000 on your host machine to the port 5000 on the docker container. Finally, you're setting up a volume mapping on th ehost from /remotely-data
to the container folder /remotely-data
. This mapping will allow you to keep backups of your remotely information by simply copying the folder to an external drive or NAS as desired.
Once you have the command entered, press the Return / Enter key an dlet the server start up. As long as you don't get any errors in the terminal, you should be able to access your install at the IP address of your host machine on port 5000. If you have port 5000 already in use on the host, you can change the port on the left side of the colon ":" in the command to any free port on your machine. I believe I used 8282.
So I then went to http://192.168.7.51:8282 in my browser to make sure the UI came up.
Proxy the local address to a domain
I want to access my install, and make it accessible to clients through the internet, so I need a way a domain name (remotely.routemehome.org) to route to my home, and then to my docker container.
For this we use NPM. Presuming you already have it setup and accessible, log into NPM, and create a new Host entry. You need to make sure the domain you'll use points to your home IP. For this you can register a domain and create a wildcard A record (*) to point to your home's public IP, or you can use a service like DuckDNS to get a duckcns.org domain and have it update your IP as it changes over time. Other options also exist like CloudFlare's dynamic DNS options, but choose whichever options works best for you.
Beszel : 8090 admin,admin
Kuma : 3001 admin,admin
RustDesk :
Guacamole : 8080 guacadmin,guacadmin
Remotely : 5000
Navidrome : 4533
Portainer-CE : 9000
إرسال تعليق