A few questions about Docker configuration
Hello,
I have some questions about the Docker configuration: 1- I want to start an Nginx container using Docker Compose, what is the problem with the following configuration? Code:
version: '3' 3- Should the firewall be configured in the container or on the host? Thank you. |
Well the answer to question #1, is almost certainly, the indentation. YAML requires specific indentation of lines. Try this:
Code:
version: '3' |
Quote:
Thanks. How about other questions? |
"The powers that be" decided that a new thread was "a duplicate," but a few new questions were asked, so let's look at them here:
Quote:
Be mindful, as you are using "containers," that the container occupant does not "see" the host system. Instead, it sees the filesystem and the network that you specify. But, once again, there have now evolved "accepted standards" as to how you probably should set the host system up. Don't carve brand-new paths in a nearby field when there is a road nearby. "That's why you have decided to use Docker!" Docker is not, per se, "an entirely-new 'container system.'" Even though, today, it is. (Originally, it used "lxc/lxd.") Basically, it consists of "convenient packaging." Tens of thousands of us(!) are basically out there doing the same thing. So, "somebody built a power-tool." Like Docker. Because: "Actum Ne Agas: Do Not Do A Thing Already Done." |
there was life before containers. You do not need to use containers at all, but you may use them if you find them useful. As usual.
You need to learn how to do things, you need to understand how they work. What is the purpose of that yaml file, what contains a container and how can you build and update it. All these things are very well documented and I can only repeat those sites. What's the point of all this if you don't understand anything out of it? |
Hello,
Thanks, but I did not receive answers to my questions. |
I think you actually did.
Here’s what I suggest: search for any one of the many dozens of tutorials which show you, step by step, how to “set up LAMP in Docker.” Follow their instructions explicitly. And, as you do so, carefully notice which Docker packages they selected – and why. Yes, there’s a bit of a learning curve for you to simply get past. The entire idea behind “Docker” is to fully-automate, as much as possible, the steps that “we all have to do.” Of course it’s not the only way, but it’s convenient. I strongly encourage you then to “peek inside” each of the packages to see exactly what they did. “How was the trick done?” |
Quote:
|
Quote:
I haven't built anything with docker yet (working on it), it's new to me too. I admit I haven't yet found a good use for docker-compose. However, I'm still pretty dangerous with docker. I know it took some time, but I will be able to build what I'm trying to build in a few months (save the Linux Active Directory Server - That's a bit much for me for now). I admit I will need some help here and there. HOWEVER, I CAN DO WHAT I'M TRYING TO DO, ableit a learning curve. If I can, others can too, if you're already at the level you show from trying to write the file. Just to be complete, I will try to find again and link a server building website I learned from ages ago! I'll have to do so in the next post, this is getting too long. But if they helped me, they should help you too, again, judging from the level you shown by trying the file. If you were at an earlier level, you probably couldn't put the file together. I also don't know where you stand with overall linux knowlege, but first of all, that's why I'm trying to give back, because it's a way to help, and I now know quite a bit. But I DID go to school pretty short ago too. But basically, at my level, I can't give you the answer. But I can tell you where to look. I would give you them if I had them. And then, after I've done as much as I said, if I even need to complete those steps, there's nothing else I can do for you, so then I will go silent. But I do think that since you're still posting here, that I can do that much. If someone knows where the other thread is, better link them together, unless you instruct me not to post, when they are posting so constantly. But to everyone, if I do this that I'm thinking, and it still doesn't help, there's nothing more I can do. Short of learning to give classes, but right now, I can't open the classes I give up to the public. I can't afford the costs to do that right now, and I'm not making any money at those classes. Here goes in the next post... |
How to do server work with docker:
https://www.youtube.com/watch?v=3c-iBn73dDE https://www.youtube.com/watch?v=pTFZFxd4hOI https://www.youtube.com/results?sear...+for+beginners How to do some server work manually (a basic server): https://www.howtoforge.com/tutorial/...and-ispconfig/ That's step #1. Try to use these first. If those don't answer all your questions, then please tell me, but make effort to use them first. Then, if it doesn't, I will upload my linux command file, if it lets me. If that doesn't work, then I'll be at the point of going silent probably. Hopefully this helps though, though I can't give you the exact timeframe where they talk about docker compose. |
This is also, one of my best and most helpful threads, I think, so if you found some help because of it, try to up my rep if you know how. I'm not sure I know how, but I would think it's done by clicking on the rep link. I haven't messed with that so far, but I'd like to start learning the rep, and get more rep, WHEN I'M HELPFUL.
|
But, let me also interject this:
"Docker" ≠ (!!) "Containers!" The two are not the same. "Docker" is designed to create very-convenient packaging, within – shall I say, "on top of" – a "containerized" environment, for "the things that we most-commonly do." For example, "setting up a LAMP plus MySQL plus FastCGI server." Boom. Install a few packages and just sit back and watch it work. "Extra-credit points" if you delve into the internal workings of any of them to see exactly how they work. (Old-schoolers like me might refer to this as "a MACRO facility," and they would also know why I used "all caps" or a particular typeface.) But, a helluva lot of people out there, now, don't have any need to do so, and that is precisely the point. "Good for them." Docker, of course, turned out to be "a huge success" in a pragmatic commercial world which needs to "quickly and reliably" deploy identical copies of the same thing, without investing "human time" and exposing itself to "human error." (Sound familiar?) Download "a package" – or "build one" as the case may be – and, there you go. Can you describe your system's requirements in terms of "it needs [these] 'library Docker containers?'" "Good for you," especially when you shop for certain flavors of "cloud hosting" (which were built with this in mind ...). Programmers worked very quickly to enable you to "reap Docker goodness," regardless (as much as possible ...) of your "host operating-system type." And they generally succeeded. "But, I digress." But there are other ways to approach this (in Linux). For example, "lxc/lxd" provides something much closer to a "bare virtual machine." (And, in fact, "Docker" started out by using this as its foundation.) As always, "the beauty of Linux is: choice." (And, yeah: "power tools.") |
Quote:
|
All times are GMT -5. The time now is 01:58 AM. |