discourse_test: Only apply `ENTRYPOINT` to release image (#663)
authorDavid Taylor <david@taylorhq.com>
Tue, 3 Jan 2023 17:20:49 +0000 (17:20 +0000)
committerGitHub <noreply@github.com>
Tue, 3 Jan 2023 17:20:49 +0000 (17:20 +0000)
The slim images aren't able to run the full `rake docker:test` task, so having it as the entrypoint doesn't make sense. We only want it as the entrypoint on `discourse_test:release`

image/discourse_test/Dockerfile

index a86ed6b371038f5c2d5c6b5e4ce01f2933d80d4f..3a4fbbad67853771e8014ab89dd9fc30fb6e2621 100644 (file)
@@ -5,7 +5,6 @@ ENV RAILS_ENV test
 
 WORKDIR /var/www/discourse
 ENV LANG en_US.UTF-8
-ENTRYPOINT sudo -E -u discourse -H ruby script/docker_test.rb
 
 # configure Git to suppress warnings
 RUN sudo -E -u discourse -H git config --global user.email "you@example.com" &&\
@@ -35,3 +34,5 @@ RUN cd /var/www/discourse &&\
 
 RUN cd /var/www/discourse && sudo -E -u discourse -H bundle exec rake plugin:install_all_official &&\
     sudo -E -u discourse -H bundle exec rake plugin:install_all_gems
+
+ENTRYPOINT sudo -E -u discourse -H ruby script/docker_test.rb