#196 Set hostname for our containers in our docker stack
Merged 6 years ago by frostyx. Opened 6 years ago by frostyx.
copr/ frostyx/copr docker-stack-hostname  into  master

file modified
+5
@@ -4,6 +4,7 @@ 

      build:

        context: .

        dockerfile: docker/backend/Dockerfile

+     hostname: backend

      command: /bin/run.sh

      stdin_open: true

      tty: true
@@ -18,6 +19,7 @@ 

      build:

        context: .

        dockerfile: docker/builder/Dockerfile

+     hostname: builder

      command: /bin/run.sh

      stdin_open: true

      tty: true
@@ -32,6 +34,7 @@ 

      build:

        context: .

        dockerfile: docker/frontend/Dockerfile

+     hostname: frontend

      command: /bin/run.sh

      depends_on:

        - database
@@ -48,6 +51,7 @@ 

      build:

        context: .

        dockerfile: docker/database/Dockerfile

+     hostname: database

      command: /bin/run.sh

      stdin_open: true

      tty: true
@@ -58,6 +62,7 @@ 

      build:

        context: .

        dockerfile: docker/distgit/Dockerfile

+     hostname: distgit

      command: /bin/run.sh

      stdin_open: true

      tty: true

This is particularly helpful when you have opened shells to multiple containers at the same time ... You can see the hostname in terminal tab/window title, ...

Pull-Request has been merged by frostyx

6 years ago
Metadata