refactor: fix handling of string andd array CMD and ENTRYPOINT values
Previous versions extracted the values as strings, prefixing the values with `/bin/sh -c '$CMD'` unnecessarily. This caused issues where we would incorrectly overrride these values when an app had a predeploy script. Closes #3143
This commit is contained in:
10
tests/apps/dockerfile-entrypoint/Dockerfile
Normal file
10
tests/apps/dockerfile-entrypoint/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM ruby:2.5.1
|
||||
|
||||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
|
||||
ADD Procfile Procfile
|
||||
ADD entrypoint entrypoint
|
||||
ADD app.json app.json
|
||||
|
||||
ENTRYPOINT ["./entrypoint"]
|
||||
1
tests/apps/dockerfile-entrypoint/Procfile
Normal file
1
tests/apps/dockerfile-entrypoint/Procfile
Normal file
@@ -0,0 +1 @@
|
||||
web: sleep 1000
|
||||
7
tests/apps/dockerfile-entrypoint/app.json
Normal file
7
tests/apps/dockerfile-entrypoint/app.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"scripts": {
|
||||
"dokku": {
|
||||
"predeploy": "touch /app/predeploy.test"
|
||||
}
|
||||
}
|
||||
}
|
||||
4
tests/apps/dockerfile-entrypoint/entrypoint
Executable file
4
tests/apps/dockerfile-entrypoint/entrypoint
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "entrypoint script started with arguments $@"
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user