Skip to content

Instantly share code, notes, and snippets.

@rjocoleman
Last active October 25, 2018 04:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjocoleman/254a4883e14dd3b61a9866c591944640 to your computer and use it in GitHub Desktop.
Save rjocoleman/254a4883e14dd3b61a9866c591944640 to your computer and use it in GitHub Desktop.
FROM alpine:3.8
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
ARG relica_os=linux
ARG relica_arch=amd64
ARG relica_ver=1.0.0-rc2
ADD https://relica-releases.s3.wasabisys.com/dist/v${relica_ver}/relica_v${relica_ver}_${relica_os}_${relica_arch}.tar.gz /tmp/relica.tar.gz
RUN mkdir /opt \
&& tar -xzf /tmp/relica.tar.gz -C "/opt" \
&& chown -R $(id -u):$(id -g) /opt/relica \
&& rm /tmp/relica.tar.gz
ENV PATH=$PATH:/opt/relica/bin
## TODO check this out to see if there is a smarter way, or if needed to bring in our own config file
RUN sed -i '/^upgrade_policy = /{h;s/ = .*/ = "disabled"/};${x;/^$/{s//upgrade_policy = "disabled"/;H};x}' /opt/relica/config.toml
EXPOSE 1201
VOLUME /root/.relica
ENTRYPOINT ["relica", "-config", "/opt/relica/config.toml", "-log", "stdout"]
CMD ["daemon"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment