Skip to content

Commit

Permalink
add readwrite volumes to agent Dockerfile (#2436)
Browse files Browse the repository at this point in the history
  • Loading branch information
xvello committed Oct 11, 2018
1 parent 33525e8 commit cb95cc0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfiles/agent/Dockerfile
Expand Up @@ -58,7 +58,9 @@ ENV DOCKER_DD_AGENT=true \
# Direct all agent logs to stdout
S6_LOGGING=0 \
# Exit container if entrypoint fails
S6_BEHAVIOUR_IF_STAGE2_FAILS=2
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
# Allow readonlyrootfs
S6_READ_ONLY_ROOT=1

# Install openjdk-8-jre-headless on jmx flavor
RUN if [ -n "$WITH_JMX" ]; then apt-get update \
Expand Down Expand Up @@ -112,4 +114,7 @@ EXPOSE 8125/udp 8126/tcp
HEALTHCHECK --interval=2m --timeout=5s --retries=2 \
CMD ["/probe.sh"]

# Leave following directories RW to allow use of kubernetes readonlyrootfs flag
VOLUME ["/var/run/s6", "/etc/datadog-agent", "/var/log/datadog", "/tmp"]

CMD ["/init"]
4 changes: 4 additions & 0 deletions releasenotes/notes/support-read-only-fs-c4ddeb97bfd6dc3e.yaml
@@ -0,0 +1,4 @@
---
features:
- |
Docker image: running with a read-only root filesystem is now supported

0 comments on commit cb95cc0

Please sign in to comment.