From 896d1f9928e49bce3eb30a3344f5f23ba6a496fe Mon Sep 17 00:00:00 2001 From: Eugene Dementiev Date: Tue, 25 Jun 2019 11:33:46 +1200 Subject: [PATCH] Add instructions how to use as a Docker stage --- README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 40ee302..658133a 100644 --- a/README.md +++ b/README.md @@ -91,9 +91,26 @@ ENV PROJECT myproject ENV ENVIRONMENT production RUN wget -O /tmp/ssm-parent.tar.gz https://github.com/springload/ssm-parent/releases/download/v0.9/ssm-parent_0.9_linux_amd64.tar.gz && \ - tar xvf /tmp/ssm-parent.tar.gz && mv ssm-parent /sbin/ssm-parent && rm /tmp/ssm-parent.tar.gz + tar xvf /tmp/ssm-parent.tar.gz && mv ssm-parent /usr/bin/ssm-parent && rm /tmp/ssm-parent.tar.gz -ENTRYPOINT ["/sbin/ssm-parent", "run", "-e", "-p", "/$PROJECT/$ENVIRONMENT/backend/", "-r", "--"] +ENTRYPOINT ["/usr/bin/ssm-parent", "run", "-e", "-p", "/$PROJECT/$ENVIRONMENT/backend/", "-r", "--"] +CMD ["caddy" , "--conf", "/etc/Caddyfile", "--log", "stdout"] +``` + +### Use as a Docker stage + +``` +# get the ssm-parent as a stage +FROM springload/ssm-parent as ssm-parent + +# your main stage +FROM alpine +ENV PROJECT myproject +ENV ENVIRONMENT production + +COPY --from=ssm-parent /usr/bin/ssm-parent /usr/bin/ssm-parent + +ENTRYPOINT ["/usr/bin/ssm-parent", "run", "-e", "-p", "/$PROJECT/$ENVIRONMENT/backend/", "-r", "--"] CMD ["caddy" , "--conf", "/etc/Caddyfile", "--log", "stdout"] ```