Whoa... It took me 7 days to learn Docker and get it set up as a DEV environment.\ It took a lot longer than I expected... but Docker really is a whole new worl
GGAMI·
Whoa... It took me 7 days to learn Docker and get it set up as a DEV environment.
It took a lot longer than I expected... but Docker really is a whole new world.
I used to write down installation methods and steps in text documents, but with Docker, there’s no need for that. You can easily document all of it through Docker images.
To be honest, it seems like Docker will eliminate Linux administrators, or all the experts related to Linux.
It’s just so accessible, so easy to install—everything is easy. I can’t help thinking that Linux experts may disappear now.
Of course, Docker does cause some performance loss on the server. But hardware has advanced to the point where it can make up for even that loss, so people choose Docker.
I’m using Docker for the first time, but when the Ryzen 3950X comes out, I plan to rebuild my existing server computer with CentOS 8.
With CentOS 8, I plan to install Docker without installing anything else on Linux (just the basics), and use Docker for everything (Mysql, PostgreSQL, Redis, Mongodb, etc.).
There’s no need to deal with difficult Iptables configuration, either. You just create a Docker image, take that image and compile it, and then you’re done. There are many images made with various languages in Docker images (?), so you’re not tied to a particular server environment.
And although I haven’t tried load balancing with this Docker system, I hear that it makes those kinds of tasks easy, too. So, can Linux experts even exist anymore...? Dozens of images are shared through the Hub, their usage is explained clearly, and the languages are developed to suit their particular characteristics...
Anyway, I struggled at first to set up the Traefik service. It took time to understand things like Docker networking, and it also took time to understand Docker’s own syntax.
I brought up postgresql, mongodb, and redis servers on Traefik. Naturally, I set their storage locations to be mounted on Linux so the data would be stored permanently.
It took time to understand Docker’s own world of volumes and networks, and it also took time to understand the world of Traefik...
After that, I set up the backend, and the frontend (Nuxt.js) was just easy. All I had to do was run npm install using a node image, and that was it... (I handled live code changes by modifying the watch value in nuxt.config.js.)
But PHP was the problem... Starting with Imagick, there were various options, so I had to install php7.3 first and then install them using various commands.
But there’s the docker-php-ext- command, so I handled it without much difficulty... (It’s really amazing... Actually, working in Docker is simpler and more convenient than compiling things in Linux and doing each step manually!!)
It took a little while to install and use composer, supervisord, and cron.
There were also some things that caused problems with each other, so
docker exec -it 2aae261bc3a2 /bin/bash
I ended up spending longer than expected accessing it with that command, trying things out one by one, and fixing the parts that caused problems... (But it was really easy because I was using a GitHub Docker file uploaded by someone I like as an example, and that helped me understand a lot about writing a dockerfile.)
Well... now that my 7 days of learning Docker and setting up a dev environment are over, I need to start development... (Sigh... I still have a long way to go. Half of August has already gone by, and there’s still no progress on the work...)
Still, I learned a really great technology, so it wasn’t bad. I’m just worried that it’ll take a lot of time again to install Docker on Linux, create the dockerfile and docker-compose for the prod environment, and test everything... (It probably won’t be as complicated as Dev; it’ll be similar, except without Xdebug and, well... I’ll set up the things that need to be configured... and instead of mounting volumes, I can add them with ADD or COPY...)
Anyway, I’m sure it’ll work out.
With Docker, you can also install and use Laravel Horizon, run the Laravel queue server under supervisord, and use the scheduler!! It’s really the best... When developing Laravel in a Windows environment, you have to start the queue server yourself, and setting up the scheduler is a hassle, but if you configure just one Docker image file properly, you can get everything running by running the Docker image once! Start developing with Docker right now!