chore(setup): Mount scripts instead of baking into img

Allows switching between branches of compatible stack versions (e.g.
main <-> tls) without having to rebuild the setup image.
This commit is contained in:
Antoine Cotten 2022-11-17 21:20:31 +01:00
parent a02b7a0d3a
commit a1b5e0b858
No known key found for this signature in database
GPG Key ID: 94637E68D4A79DD0
2 changed files with 5 additions and 4 deletions

View File

@ -16,6 +16,9 @@ services:
ELASTIC_VERSION: ${ELASTIC_VERSION}
init: true
volumes:
- ./setup/entrypoint.sh:/entrypoint.sh:ro,Z
- ./setup/helpers.sh:/helpers.sh:ro,Z
- ./setup/roles:/roles:ro,Z
- setup:/state:Z
environment:
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-}

View File

@ -5,12 +5,10 @@ FROM docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION}
USER root
COPY . /
RUN set -eux; \
mkdir /state; \
chown elasticsearch /state; \
chmod +x /entrypoint.sh
chmod 0775 /state; \
chown elasticsearch:root /state
USER elasticsearch:root