At …
https://github.com/pydanny/cookiecutter-django/blob/efbf164e84998a8d450133bd00c14c07b25bf8c4/%7B%7Bcookiecutter.project_slug%7D%7D/compose/production/django/entrypoint#L1
… it reads #!/bin/sh so the script has no guarantee to deal with Bash (and not just a POSIX shell) but then uses Bash features, e.g. set -o pipefail.
I would expect
#! /usr/bin/env bash orThank you!
As far as I remember, we intended to use sh because bash isn't installed in the alpine image we use. Feel free to send a pull request to cleanup the "bashism".
Hello,
I've recently changed my django/dockerfile from alpine to python:3.7-slim-buster.
When i try to run docker-compose -f local.yml up , appears the following error:
django_1 | /entrypoint: 4: set: Illegal option -o pipefail
do you know why occur this?
do you know why occur this?
Because /bin/sh in Debian buster understands set -o errexit and applies it and then set -o pipefail not only fails loudly but also exits the shell.
This problem now fixed, our bash scripts are using bash shebang, so I'll close this.
Most helpful comment
Hello,
I've recently changed my django/dockerfile from alpine to python:3.7-slim-buster.
When i try to run docker-compose -f local.yml up , appears the following error:
django_1 | /entrypoint: 4: set: Illegal option -o pipefaildo you know why occur this?