Real Discussion: Sell me on Docker, because I am not convinced of 99% of the benefits. I have an open mind, and will accept all logical arguments

Adding this as I fogot to include installing a DB engine or OS dependency in the "rant",

  • I can see in the windows/.net side of things, that sometimes dependencies needs to be installed on the target device for client applications/services that uses third party drivers/sdk, but I think that this can be handled by the developer, providing a simple text file with instructions or a user guide
  • some projects might need OS level dependencies or installing a DB engine. Installing a DB doesn't take that much time following a tutorial to install, and setup simple privileges/user

my view and workflow for perspective and context as I am not really exaggerating any of these points or the amount of work or time needed to each one. Bear with me.


so normally I can develop a project using java, in Intellij Idea,

  • I make a java project, not maven, not gradle, no xml or gradle files
  • I can integrate with some git server. I used github, bitbucket, and azure devops over the years
  • import all the dependencies through the IDE, from maven into a lib folder
  • I embed everything in the project including http servers
  • at the end, I can make a simple self contained jar file (this might take anywhere from 1-2 minutes to add the option to make the jar file on every rebuild or run inside the IDE)
  • I can make a script to upload the file through http or scp or sftp or ftps but I usually manually do so using winscp if I am developing on windows (takes maybe 1-2 minutes to open winscp and start uploading the jar file) or using a script if I am developing on ubuntu desktop. I started adding a json file with a checksum to ensure that the file is fully uploaded when using a script to upload the jar file (I have been thinking of subsituting this step with an automated git script on the server)

deployment setup

so normally I would use a local ubuntu server or ubuntu server vps,

  • setting up a default java jre or jdk takes (1-10) minutes, to either check if it's preinstalled, or to install it, and check that the environment variable is set. this is a one time operation
  • it's not necessary to make a one line shell script file and I can make a service, but I usually make a script and set it to either print output to a file or null, and run in the background. this is a one time operation and doesn't change or need modifications once it's made

example of shell script


nohup java -jar app1.jar &



nohup java -jar app2.jar >/dev/null 2>&1 &

  • making the shell script to start when the server starts in case of a restart or power failure takes maybe 5 minutes to look up where to add a line that tells ubuntu to run that script or jar file depending on the ubuntu version (this is a one time operation)

upgrades and restarts

  • on newer projects, I started to make a "bootstrap" application that handles running the other applications, checking for updates by watching a folder, checking the checksum of the jar file, stopping the applications/services, moving the jar file and launching the applications again, so I don't have to include an update mechanism in every project. This is a one time development project, and is dynamic enough find, run, and update, all jar files placed in a folder

the cons

  • having more than one domain/sub domain pointing to the same server usually involves manually configuring the domain to point to the server, setting let's encrypt, sometimes messing with nginx or apache for what seems like an eternity but it's usually half or one days worth of light work. Not sure if something like traefic would be better, or using ddclient for setting up local servers in combination with traefic

now docker

in using docker for a limited time, this is my experience

  1. it involves installing docker which is as many steps or more than installing dependencies using "sudo apt-get install app1 -y", so it's not "easier than setting up the environment" or "easier to manage OS dependencies or program dependencies"
  2. it involves editing configuration files just as much or more than other technologies/repositories/frameworks, so it's not "no configuration needed" or "less configuration"
  3. a lot of times it just doesn't "just work", and editing config files/trial and error might be needed, so it doesn't "just work out of the box" also, you have to put the application in the box/container/image, so it's more steps
  4. it takes more time to download/run/get the id or name/close/remove images/delete this or that docker thing, than starting and stopping an application the normal way
  5. it takes time to start a docker image and start running an app, as oppose to, just running an app on the server
  6. updating an image seems to take more time than git or just uploading a file

submitted by /u/AmrRahmy
[link] [comments]
Source: Reddit