Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ RUN apt-get update && \
# remove apt cache from image
apt-get clean all

# Docker Healthcheck:
HEALTHCHECK CMD /usr/local/bin/healthcheck.sh

# expose minecraft port
EXPOSE 25565
Expand Down
11 changes: 11 additions & 0 deletions rootfs/usr/local/bin/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# Basic healthcheck for docker, remove # from echo if you want some sort of output.
# During build, it will show as unhealthy in docker ps

if /usr/bin/supervisorctl status spigot | grep -q 'RUNNING'; then
# echo "matched"
exit 0
else
# echo "failed"
exit 1
fi