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:
Jose Diaz-Gonzalez
2020-08-31 02:31:36 -04:00
parent 7ca4cba8ec
commit 53dabf7fd0
10 changed files with 107 additions and 22 deletions

View 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"]

View File

@@ -0,0 +1 @@
web: sleep 1000

View File

@@ -0,0 +1,7 @@
{
"scripts": {
"dokku": {
"predeploy": "touch /app/predeploy.test"
}
}
}

View File

@@ -0,0 +1,4 @@
#!/bin/bash
echo "entrypoint script started with arguments $@"
exec "$@"