From d0f8a678ba4a2f71e9c80725996c357f29781153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 22 Dec 2021 19:01:58 +0100 Subject: [PATCH] Simplify entrypoint configuration --- Dockerfile | 3 +-- docker-compose.yml | 1 - scripts/entrypoint.sh => docker-entrypoint.sh | 0 3 files changed, 1 insertion(+), 3 deletions(-) rename scripts/entrypoint.sh => docker-entrypoint.sh (100%) diff --git a/Dockerfile b/Dockerfile index df5c9d1d2..4eabfe983 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,8 +31,6 @@ RUN adduser --shell /bin/bash --disabled-password --gecos "" consul \ RUN echo 'Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bundle/bin"' > /etc/sudoers.d/secure_path RUN chmod 0440 /etc/sudoers.d/secure_path -COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh - # Define where our application will live inside the image ENV RAILS_ROOT /var/www/consul @@ -50,6 +48,7 @@ RUN bundle install # Copy the Rails application into place COPY . . +ENTRYPOINT ["./docker-entrypoint.sh"] # Define the script we want run once the container boots # Use the "exec" form of CMD so our script shuts down gracefully on SIGTERM (i.e. `docker stop`) # CMD [ "config/containers/app_cmd.sh" ] diff --git a/docker-compose.yml b/docker-compose.yml index b174b9ebc..89b377968 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,6 @@ services: # use the Dockerfile next to this file build: . - entrypoint: /usr/local/bin/entrypoint.sh # rely on the RAILS_ENV value of the host machine # environment: diff --git a/scripts/entrypoint.sh b/docker-entrypoint.sh similarity index 100% rename from scripts/entrypoint.sh rename to docker-entrypoint.sh