From 11a5a990d068b1a2b6f6b28e24259778ad723d60 Mon Sep 17 00:00:00 2001 From: Thomas <9749173+uhthomas@users.noreply.github.com> Date: Tue, 23 May 2023 15:02:47 +0100 Subject: [PATCH] docker: use default entrypoint and command where applicable (#2529) A default entrypoint and command make it just a bit easier to use the images as there is no longer a need for an explicit entrypoint. The exception is the server image, which still requires the shell script to be specified. --- docker/docker-compose.yml | 5 ++--- server/Dockerfile | 2 ++ web/Dockerfile | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index b00ccf8bc9..1915548aa4 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -4,7 +4,7 @@ services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:release - entrypoint: ["/bin/sh", "./start-server.sh"] + command: ["start-server.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: @@ -18,7 +18,7 @@ services: immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:release - entrypoint: ["/bin/sh", "./start-microservices.sh"] + command: ["start-microservices.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: @@ -42,7 +42,6 @@ services: immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:release - entrypoint: ["/bin/sh", "./entrypoint.sh"] env_file: - .env restart: always diff --git a/server/Dockerfile b/server/Dockerfile index 2c1140a13b..c0d6725c96 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -39,3 +39,5 @@ RUN npm link && npm cache clean --force VOLUME /usr/src/app/upload EXPOSE 3001 + +ENTRYPOINT ["/bin/sh"] diff --git a/web/Dockerfile b/web/Dockerfile index 536f764f56..0973a3d40f 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -38,3 +38,7 @@ COPY --from=prod /usr/src/app/build ./build COPY package.json package-lock.json ./ COPY entrypoint.sh ./ + +ENTRYPOINT ["/bin/sh"] + +CMD ["entrypoint.sh"]