From cdd9e158e200e780d8b79e6db0e36f0d8620f481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Mon, 1 Jul 2024 21:32:10 +0200 Subject: [PATCH] refactor(docker): remove placeholder image names (#1077) Motivation ---------- The `image` in a `docker-compose.yml` is not required. If you want to build the docker image from the `Dockerfile` you can simply add a build context. How to test ----------- 1. `docker image rm` all the dreammall images 2. `docker compose up` 3. All images get rebuilt --- docker-compose.override.yml | 26 +------------------------- docker-compose.yml | 8 -------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 8d91af61a5..329df49624 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -11,8 +11,6 @@ services: # PRESENTER ############################################ ######################################################## presenter: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/presenter:local-development build: target: development ports: @@ -31,8 +29,6 @@ services: # PRESENTER STORYBOOK ################################# ####################################################### presenter-storybook: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/presenter:local-storybook build: context: ./presenter target: storybook @@ -51,8 +47,6 @@ services: # PRESENTER DOCUMENTATION ############################# ####################################################### presenter-documentation: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/presenter:local-documentation build: context: ./presenter target: documentation @@ -71,8 +65,6 @@ services: # FRONTEND ############################################# ######################################################## frontend: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/frontend:local-development build: target: development ports: @@ -92,8 +84,6 @@ services: # FRONTEND STORYBOOK ################################## ####################################################### frontend-storybook: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/frontend:local-storybook build: context: ./frontend target: storybook @@ -112,8 +102,6 @@ services: # FRONTEND DOCUMENTATION ############################## ####################################################### frontend-documentation: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/frontend:local-documentation build: context: ./frontend target: documentation @@ -132,8 +120,6 @@ services: # ADMIN ################################################ ######################################################## admin: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/admin:local-development build: target: development ports: @@ -153,8 +139,6 @@ services: # ADMIN STORYBOOK ##################################### ####################################################### admin-storybook: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/admin:local-storybook build: context: ./admin target: storybook @@ -173,8 +157,6 @@ services: # ADMIN DOCUMENTATION ################################# ####################################################### admin-documentation: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/admin:local-documentation build: context: ./admin target: documentation @@ -193,8 +175,6 @@ services: # BACKEND ############################################# ####################################################### backend: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/backend:local-development build: context: ./backend target: development @@ -211,8 +191,6 @@ services: # BACKEND DOCUMENTATION ############################### ####################################################### backend-documentation: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/backend:local-documentation build: context: ./backend target: documentation @@ -231,8 +209,6 @@ services: # DOCUMENTATION ######################################## ######################################################## documentation: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/dreammall:local-documentation build: target: documentation ports: @@ -258,4 +234,4 @@ volumes: admin_documentation_node_modules: backend_node_modules: backend_documentation_node_modules: - documentation_node_modules: \ No newline at end of file + documentation_node_modules: diff --git a/docker-compose.yml b/docker-compose.yml index 2740e45d30..2479fc13a6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,8 +22,6 @@ services: # PRESENTER ############################################ ######################################################## presenter: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/presenter:local-production build: context: ./presenter target: production @@ -39,8 +37,6 @@ services: # FRONTEND ############################################# ######################################################## frontend: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/frontend:local-production build: context: ./frontend target: production @@ -56,8 +52,6 @@ services: # ADMIN ################################################ ######################################################## admin: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: dreammall/admin:local-production build: context: ./admin target: production @@ -73,8 +67,6 @@ services: # BACKEND ############################################# ####################################################### backend: - # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there - image: it4c/backend:local-production build: context: ./backend target: production