1

So I'm evaluating docker for our current system and I just have a couple of questions. Note I'm not an expert, I just want some answers here to try to get a clearer impression of whether Docker works for our organisation.

So we want to deploy a .NET Core app with a SQL database. We have some special requirements about our infrastructure which I won't go into - but basically we have no idea what OS it'll be running and a lot of red tape in gaining access to the environment.

So that is part of the reason I want to deploy with Docker. Just have as much as we can fully controlled from our end and just make sure we get Docker installed on the prod server. My dream goal would be for each release, I can just give the infrastructure company a docker image, and they just run a container of it in production.

So my questions

1) We'll likely have different servers for the app and for the database. Is it a good idea then to develop seperate docker compose files for them and just have seperate deployments?

2) Can Docker containers access external resources outside of the container? So like for example, if there is an existing SMTP server or even some files sitting in a directory on the server, would something inside a docker container be able to access that? If so, what kind of resources can they access? Does it just need a URL or port number?

3) Is there any sort of way to config file for a docker image? I was thinking each image for each environment would all be the same and each environment (eg. dev, prod) would have its own config file

Ok_Joe
  • 11
  • 1
  • This question(s) may invite biases as it sounds like this could be admin preference Sometimes "Best-Practice" questions are good for softwareengineering.stackexchange.com. You might also try the chat in case your question is closed. – Chad Harrison May 14 '18 at 21:00

1 Answers1

1
  1. Do not host databases in a docker container. It’s not a good practice.
  2. Look at volumes to share files on the server to the docker container. Look also into docker networks. A docker container can have internet access, so I think it could be possible to connect to other servers.
  3. Maybe look into kubernetes or docker swarm also :) sounds like something you could use for your company. With kubernetes you can have something like staging environments and rolling releases for example
Sukhjinder Singh
  • 1,944
  • 2
  • 8
  • 17