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:
parent
a02b7a0d3a
commit
a1b5e0b858
|
@ -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:-}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue