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}
|
ELASTIC_VERSION: ${ELASTIC_VERSION}
|
||||||
init: true
|
init: true
|
||||||
volumes:
|
volumes:
|
||||||
|
- ./setup/entrypoint.sh:/entrypoint.sh:ro,Z
|
||||||
|
- ./setup/helpers.sh:/helpers.sh:ro,Z
|
||||||
|
- ./setup/roles:/roles:ro,Z
|
||||||
- setup:/state:Z
|
- setup:/state:Z
|
||||||
environment:
|
environment:
|
||||||
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-}
|
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-}
|
||||||
|
|
|
@ -5,12 +5,10 @@ FROM docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION}
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
COPY . /
|
|
||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
mkdir /state; \
|
mkdir /state; \
|
||||||
chown elasticsearch /state; \
|
chmod 0775 /state; \
|
||||||
chmod +x /entrypoint.sh
|
chown elasticsearch:root /state
|
||||||
|
|
||||||
USER elasticsearch:root
|
USER elasticsearch:root
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue