Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
duckWit56166yDo yourself a big favor and learn it, it's worth the learning curve. You basically download disk images of various packages and run them in isolated containers.
-
duckWit56166yFor example, want to run a MySQL instance (and not have MySQL installed)? Just download the image for it and run it in a container via command line:
docker pull mysql
Then:
docker run -p 27107:27107 mysql
So, 27107:27107 is the external port (left of the : character), mapped to the internal port of the container (right of the : character).
works on any OS (Linux/Windows/Mac).
Just like that you have a MySQL instance up and running. When you're done, stop the container, remove it, and then remove the image. -
Man I feel your pain.
I just wanted to play music from an old CD to see what was on it. Took me 15 fucking minutes to figure out why it wasn't fucking reading and to install a new media center since th default one shit a brick. -
duckWit56166yThere are thousands of different docker images you can download and run:
https://hub.docker.com/explore/ -
Digital ocean has a good tutorial about it.
P.S. it is second or third time I am mentioning digital ocean. I don't have any affiliation to it. -
hasu23186yAdvantage: instead of having to configure and do some complicated setup for somw fancy software, someone else can do that and upload it as a docker container, so you won't have to do it.
-
@TheOct0 Right so you know how a traditional virtual machine (KVM, VirtualBox, vmware etc) replicates a physical system down to hardware details (virtual CPUs and devices and all)? It basically tricks the guest operating system into thinking it's running on a physical machine, whereas it's actually just running inside a simulation of a machine (let's ignore paravirtualization here).
VMs are absolutely great for isolation, you can run 10 OSes on one host and they'll behave as if you have 10 separate physical computers. The problem with that it's very resource intensive to do all that simulation. What if you just have ten applications that you need to run with reasonable isolation, and you don't actually need the "fake a machine" level of isolation?
Enter Docker. It uses the host kernel to create operating system environments on top of the host kernel (an OS environment is basically everything that goes over the kernel - libraries, basic utilities, etc.) -
@TheOct0 Think of a Docker container as a box running some application sitting on top of your kernel. The box contains everything the application needs to run, the only thing it goes to the host kernel for is system calls (disk I/O, etc.)
So suppose you're on Arch and you installed Docker. You can then use Docker to run nginx or Apache web server in an Ubuntu container.
Translation: you have a box containing the Ubuntu environment minus the kernel and with Nginx installed in it. Whenever you run this container, nginx will run inside this box using the provided Ubuntu environment instead of your Arch environment, but it uses your Arch kernel to do the work (this works great because the Linux kernel is common to all distros).
Containers behave a lot like VMs in that you can "log in" to them (docker attach) and get a terminal running inside the container. Or you can just script an automated service inside it. Host a DB. Run build tools in isolation. Etc.
Hope this made sense lol -
TheOct039246yThanks a whole lot to all of you! That's a better start than I could have wished for. You all saved me an hour's worth of research with that :D
-
@TheOct0 rkt does have a way of running docker images. I don't remember how, but that's how I used to do docker stuff on my Chromebook.
The internet should tell you. -
daCoda6276yYou can also link those containers internally. So, you can have an Apache container and an nginx container on you system. Also you have your php webapp. You start up you PHP container and your Apache container and link them. Your webapp now runs on an Apache/PHP stack. Now you can shutdown you Apache container and start you nginx container and link it with you PHP container. Now you have a nginx/PHP stack. All on one system within seconds. Same with different PHP versions. You can have a php5, php6 and php7 container. Just start them up and test on different PHP versions. "Docker compose" helps you with starting and linking those containers with just one file.
-
daCoda6276yAnd if you are really crazy you can also use docker containers with PHPstorm for example. So u don't have to install anything on you PC but you can still use PHP, node, gulp, yarn, etc. within other programs.
-
Docker is like convienience food for server software. Just type in the command line "docker install [whatever]" and within a minute, this thing runs on your computer, without complicated configuration.
-
Related Rants
-
gururaju56*Now that's what I call a Hacker* MOTHER OF ALL AUTOMATIONS This seems a long post. but you will definitely ...
-
linuxxx70This guy at my last internship. A windows fanboy to the fucking max! He was saying how he'd never use anythi...
-
creedasaurus62Another dev on my team just got a new machine. Before he came in today I made two separate USB installers and ...
I'm not knowledgeable when it's about Linux, so when I want to do some stuff I always have to take a f*cking lesson and a half. Could someone please explain to me what Docker is?
question
i'm lost
linux
docker