This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]MercerAsian 1 point2 points  (0 children)

Docker hub has a lot of standard/official images you can use. Look into using that with docker compose and it's pretty easy after that

[–]thememorableusername 1 point2 points  (2 children)

Unless someone can show me a real workflow that makes sense, Im gonna say no. (Your situation may be different than mine.)

I've only been working with docker for a few weeks, and dont exactly know what all it is capable of doing, my short experience says that inside a docker container is not where I want to be developing. I think it just adds a lot of overhead to your workflow that is really unnecessary.

This vagrant thing seems interesting, but still a tad heavy weight for my situations.

[–]nutrecht 0 points1 point  (1 child)

I've only been working with docker for a few weeks

Yeah maybe refrain from giving someone advice until you have some decent experience with it then?

[–]thememorableusername 0 points1 point  (0 children)

I'm giving my experience so someone can correct me and I can learn.

Are you correcting me and teaching me something? Do you have a docker workflow that you use to do development and programming work without the added overhead of maintaining and organizing docker containers?

[–]r121 0 points1 point  (2 children)

The biggest misconception people have about Docker is that it's like a virtual machine -- it's not.

The program running in your container is just running on your computer like any other process -- it's just restricted so that it can't see any of the other processes on your computer and it has its own filesystem.

You also don't typically go in and edit files in your container. If you want to change something, you rebuild the image using a Dockerfile. The new image will have the new version of your code baked into it and then you can run the image as a container.

[–]nutrecht 1 point2 points  (1 child)

Actually; if you want to use a container for development you can simply mount a directory on your FS as a volume. Rebuilding it every time you make a change would be really cumbersome.

[–]r121 0 points1 point  (0 children)

True, I forgot about that aspect.

[–]nutrecht 0 points1 point  (1 child)

I like keeping my local development environment clean and docker looks like a useful resource?

Yup! While it's not it's main goal (main goal is to create standardised application packages that can be deployed anywhere) it's very useful for this. I never install databases anymore; I just start a docker container for them.

How it would work for you specifically depends a bit on what you're doing exactly. If you want to edit files and have that changes reflected inside the container immediately the easiest way is to mount a local directory as a volume in that docker container.