fix: Move healthcheck from /usr/local/bin to /usr/local/sbin
This commit is contained in:
@@ -197,7 +197,7 @@ jobs:
|
||||
command: sleep 60
|
||||
- run:
|
||||
name: Test image bootup
|
||||
command: docker exec -it salt_master /usr/local/bin/healthcheck
|
||||
command: docker exec -it salt_master /usr/local/sbin/healthcheck
|
||||
|
||||
workflows:
|
||||
build-and-test:
|
||||
|
||||
@@ -51,7 +51,7 @@ RUN bash ${SALT_BUILD_DIR}/install.sh
|
||||
COPY assets/runtime ${SALT_RUNTIME_DIR}
|
||||
RUN chmod -R +x ${SALT_RUNTIME_DIR}
|
||||
|
||||
COPY assets/bin/* /usr/local/bin
|
||||
COPY assets/sbin/* /usr/local/sbin
|
||||
|
||||
# Cleaning tasks
|
||||
RUN rm -rf "${SALT_BUILD_DIR:?}"/*
|
||||
|
||||
@@ -354,7 +354,7 @@ Check [Available Configuration Parameters](#available-configuration-parameters)
|
||||
|
||||
### Healthcheck
|
||||
|
||||
This image includes a [health check](https://docs.docker.com/engine/reference/builder/#healthcheck) script: `/usr/local/bin/healthcheck` (although it is disable by default). It is useful to check if the `salt-master` service is alive and responding.
|
||||
This image includes a [health check](https://docs.docker.com/engine/reference/builder/#healthcheck) script: `/usr/local/sbin/healthcheck` (although it is disable by default). It is useful to check if the `salt-master` service is alive and responding.
|
||||
|
||||
If you are running this image under k8s, you can define a _liveness command_ as explained [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command).
|
||||
|
||||
@@ -368,7 +368,7 @@ services:
|
||||
container_name: salt_master
|
||||
image: cdalvaro/saltstack-master:3000.3_2
|
||||
healthcheck:
|
||||
test: ["CMD", "/usr/local/bin/healthcheck"]
|
||||
test: ["CMD", "/usr/local/sbin/healthcheck"]
|
||||
start_period: 30s
|
||||
```
|
||||
|
||||
@@ -379,7 +379,7 @@ Or, if you launch your container [with docker](https://docs.docker.com/engine/re
|
||||
```sh
|
||||
docker run --name salt_master --detach \
|
||||
--publish 4505:4505 --publish 4506:4506 \
|
||||
--health-cmd='/usr/local/bin/healthcheck' \
|
||||
--health-cmd='/usr/local/sbin/healthcheck' \
|
||||
--health-start-period=30s \
|
||||
--env 'SALT_LOG_LEVEL=info' \
|
||||
--volume $(pwd)/roots/:/home/salt/data/srv/ \
|
||||
|
||||
@@ -10,8 +10,11 @@ services:
|
||||
- "keys/:/home/salt/data/keys"
|
||||
- "logs/:/home/salt/data/logs"
|
||||
ports:
|
||||
- "4505:4505/tcp"
|
||||
- "4506:4506/tcp"
|
||||
- "4505:4505"
|
||||
- "4506:4506"
|
||||
healthcheck:
|
||||
test: ["CMD", "/usr/local/sbin/healthcheck"]
|
||||
start_period: 30s
|
||||
environment:
|
||||
- DEBUG=false
|
||||
- TIMEZONE=Europe/Madrid
|
||||
|
||||
Reference in New Issue
Block a user