1

I'm investigating the possibilities of using Docker to standardize the developers' java workstation configuration. The concept being that a new dev starting on the team can quickly and easily be up and running with all tools needed to develop/build and deploy.

I understand the attraction of using Docker in a build pipeline, an even in a production environment, but am having difficulty seeing if it is useful as a tool in a dev workstation.

For example, having a docker container with Eclipse setup and configured with the necessary plugins (and build tools - ex: maven, ant, etc), a container for the DB, a container for the Application server.

Of course, I can foresee additional complexity with someone trying to edit code in Eclipse and wanting to hotswap the code in the app server if the app server is in a different container.

How can this be done successfully and efficiently with container-based environments?

1
  • I am not entirely sure if this is the right forum to ask this type of question, but am having a lot of difficulty finding the right forum on StackExchange. Please indicate if there is a better forum to ask this question. I thought I had seen a Docker community on SE, but can't seem to locate it.
    – Eric B.
    Commented Aug 8, 2016 at 18:09

2 Answers 2

1

To answer the meta-question

Vagrant is a tool designed for setting up and configuring developer workstations. You should investigate it before continuing with Docker.

To answer the Docker question

If you decide to go the docker route, then Docker Compose is your tool of choice. All of your containers would be specified in a compose file, such as this:

dev:
  eclipse:
    image: eclipse
  db:
    image: mysql
    ports: 
     - "3306:3306"
    volumes:
     - .:/db
  server:
    image: myapp_server
    ports:
     - "port:port"

Then, you simply run docker-compose up.

You can find many of the containers you need at the Docker Hub

5
  • But is using an IDE/GUI application in a Docker container even something that should be considered? And from my understanding, I've always seen Vagrant as a reproducible way to provision VMs (under VMWare, VirtualBox, etc). But when it comes to setting up a workstation, I wouldn't want to be running my IDE in a VM; I really don't see the advantage of that. Or am I missing the obvious?
    – Eric B.
    Commented Aug 9, 2016 at 15:12
  • The developer's environment would run in a VM, which you could then fullscreen, or use x-windows over SSH. (or RDP if it's a Windows environment) Commented Aug 9, 2016 at 16:41
  • GUI applications in Docker containers can work. In fact, someone containerized their entire desktop. It will simply require more work on your part to get everything setup, and you'll still end up running a VM to host docker if the developer is on Windows/OSX. Commented Aug 9, 2016 at 16:43
  • Agreed, but the VM needed to host docker can be headless. With my IDE stick inside a VM, it restricts my ability to manipulate my windows over multiple screens, virtual desktops, etc. From what I can foresee, GUI applications don`t really live too well in Docker environments.
    – Eric B.
    Commented Aug 9, 2016 at 17:56
  • Yes, native GUI apps are problematic with Docker. Now that I have a better understanding of what you're trying to accomplish exactly, I recommend a host provisioning tool such as Ansible or Puppet. They can do all the setup and configuration of the applications you need, without the need for containers/virtualization. Commented Aug 10, 2016 at 1:36
1

If I were you, I just separate several tasks from each other - and handle them in a different way. For local developer environment, I would recommend to use Puppet / Terraform / Chef (or any other config management tool) which can set up Eclipse and other GUI related tools (Puppet handles multiple package managers, available on Windows also with Chocolatey).

Non GUI type resources (like SQL server, Cache server, application server/container) could be defined in Docker (with -compose of course) - with some volume sharing between the host and the containers. Both solutions could be managed and tracked in GIT.

2
  • Thanks. That's pretty much the way I was leaning too, but good to hear confirmation. How difficult though is MS SQL Server to set up in a container? Is it any more difficult being a Windows based app (requiring a gui to setup/configure)?
    – Eric B.
    Commented Aug 18, 2016 at 13:20
  • MS SQL could be handled by unattended installation if you want to do it with Puppet/Other tool or within a docker container. The scenario could depend on hardware resources: if you are developing multiple applications on single machine it's easier to have only one server with multiple databases (local unattended install with config tool). Commented Aug 19, 2016 at 11:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .