Docker: entrypoint script fixes #162
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR should resolve #160 - the issue seems to be with the entrypoint being encoded with CRLF line endings, I've also added some extra debugging messages to the entrypoint script, to make diagnosing future Docker-related issues easier.
I'd also like to suggest building the cState Dockerfile into an image and publishing it on Docker Hub or GitHub Packages for ease of deployment. This would also make a docker-compose.yaml file possible (or at least, more user friendly). GitHub Actions are able to build the images, it doesn't take long as we're only compiling the site with Hugo at run-time.
I've also updated the Dockerfile to only clone the master branch of cstate/example, and only get the latest commit - this will hopefully improve the build speed of the image.
Changes to Documentation
I'd also like to suggest the following updates to the deploying with Docker wiki page.
Footnotes
I have some plans for the dockerfile, such as making reloading the files easier (a script that can be executed via docker exec instead of requiring the user to drop into a shell?) - but I'll bring these up in their own issue in due course.
I've based this PR from the master branch as cState currently doesn't build from the dev branch, but I can rebase it if required.