getting permission denied in docker run
You need to change the permission of the bash file by chmod +x entrypoint.sh
before calling ENTRYPOINT. So change your code to the following:
USER airflow
WORKDIR ${AIRFLOW_HOME}
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
Rebuild the image and run the container, it should work.
Since COPY
copies files including their metadata, you can also simply change the permissions of the file in the host machine (the one building the Docker image):
$ chmod +x entrypoint.sh
Then, when running docker build -t test .
the copied file will have the execution permission and docker run -p 8080:8080 test
should work.
Obs.: I'm not advocating this as best practice, but still, it works.