Skip to content

Instantly share code, notes, and snippets.

@dreamcat4
Created May 9, 2015 18:56
Show Gist options
  • Save dreamcat4/e202bac73aa79bb805cb to your computer and use it in GitHub Desktop.
Save dreamcat4/e202bac73aa79bb805cb to your computer and use it in GitHub Desktop.
How to install s6-overlay. For the latest version see https://github.com/just-containers/s6-overlay/releases
FROM ubuntu-debootstrap:14.04
MAINTAINER dreamcat4 <[email protected]>
ENV _clean="rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*"
ENV _apt_clean="eval apt-get clean && $_clean"
# Install s6-overlay
ENV s6_overlay_version="1.10.0.0"
ADD https://github.com/just-containers/s6-overlay/releases/download/v${s6_overlay_version}/s6-overlay-amd64.tar.gz /tmp/
RUN tar zxf /tmp/s6-overlay-amd64.tar.gz -C / && $_clean
ENV S6_LOGGING="1"
# ENV S6_KILL_GRACETIME="3000"
# Install pipework
ADD https://github.com/jpetazzo/pipework/archive/master.tar.gz /tmp/pipework-master.tar.gz
RUN tar -zxf /tmp/pipework-master.tar.gz -C /tmp && cp /tmp/pipework-master/pipework /sbin/ && $_clean
# Install influxdb
ENV INFLUXDB_VERSION="0.8.8"
ADD https://s3.amazonaws.com/influxdb/influxdb_${INFLUXDB_VERSION}_amd64.deb /tmp/influxdb_amd64.deb
RUN dpkg -i /tmp/influxdb_amd64.deb && $_apt_clean
ADD config.toml /config/config.toml
# Launch script
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Default container settings
VOLUME ["/data"]
EXPOSE 8083 8086 2003 25826
ENTRYPOINT ["/init", "/entrypoint.sh","-config","/config/config.toml"]
@dreamcat4
Copy link
Author

BE SURE to put "/init" as the first argument of your CMD / ENTRYPOINT e.g.:

ENTRYPOINT ["/init", "your_program.sh", <other args> ...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment