What are the best methods to work with Docker ?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Dlazzy

New Member
May 23, 2017
3
1
3
28
France
Hello,

I already tried to ask this on official Docker forums but I've got no response :/
Currently I use Bitbucket for versionning, Capistrano to deploy in the Docker container or to the server where Docker is hosted, and nginx-proxy from jwilder to access differents website from everywhere. There are the differents questions :

Keep in mind, Docker config files and source code will be updated almost everyday.

Bitbucket :
- Having two repos for one project (on BitBucket), one for the Docker files (docker-compose, apache configuration...) and one for the source code of the website.
- Or use one repo (on BitBucket), with a folder named docker at the root that contain the Docker files (docker-compose, apache configuration...), and one other named wwwroot that contain source code.

Deploy with Capistrano :
- Run a SSH server inside the apache container of the project, capistrano connect to the apache container (using a key), and do a deploy in it (of course Capistrano manage by himself the release, current, shared folder)
- Or Capistrano deploy on the server where Docker is hosted not in the container that contain the source code.

Executing npm, composer, grunt during a deploy with Capistrano :
On each deploy I need to execute of course npm install, composer install....
- Create .rake that contain all command need to be executed on each deploy.
- Or say to Capistrano to execute a .sh script in the release folder on the server that host Docker on each deploy ?

Managing environnment :

What's the best way to manage the differents environnments ?
For example, I clone the entire project I wan't to set to DEV the env. So all Docker containers will be launched with local DEV config. Same for pre production, production, staging...

Thank you for you answer, maybe you cannot give an advice to all, but some should be very very nice !
 

Jeggs101

Well-Known Member
Dec 29, 2010
1,529
241
63
I'd assume the reason you aren't getting many responses on the official docker forum is that you are using a really specific stack and it's been mostly replaced by core components that the majority of Docker people are using.

The stack that I see just about everyone using these days is:
  • DockerHub + Private registry
  • GitHub or Gitlab or other. Bitbucket isn't an issue. GitHub to docker hub has great integration if you're doing a public project.
  • Docker Compose. docker compose up.
That's how I'm seeing the stack mostly managed these days doing all of the above. When you're looking for answers, that's the way to go.
 
  • Like
Reactions: Dlazzy

Dlazzy

New Member
May 23, 2017
3
1
3
28
France
I'd assume the reason you aren't getting many responses on the official docker forum is that you are using a really specific stack and it's been mostly replaced by core components that the majority of Docker people are using.

The stack that I see just about everyone using these days is:
  • DockerHub + Private registry
  • GitHub or Gitlab or other. Bitbucket isn't an issue. GitHub to docker hub has great integration if you're doing a public project.
  • Docker Compose. docker compose up.
That's how I'm seeing the stack mostly managed these days doing all of the above. When you're looking for answers, that's the way to go.
Thank you for your reply, I will see for a private registry. Thanks again
 
  • Like
Reactions: Jeggs101

Jeggs101

Well-Known Member
Dec 29, 2010
1,529
241
63
You can pay Docker to do it or you can host your own except that's more of a pain now.