Skip to content

Commit

Permalink
Copy restic from official image
Browse files Browse the repository at this point in the history
  • Loading branch information
tdmanv committed Aug 13, 2019
1 parent 379c0f7 commit 334dd58
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
/.go
/.push-*
/.vendor
/bin
/vendor
/dist
10 changes: 5 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ builds:
goos: *goos
goarch: *goarch
dockers:
- binaries:
- kando
image_templates:
- 'kanisterio/kanister-tools:{{ .Tag }}'
dockerfile: 'docker/tools/Dockerfile'
- binaries:
- controller
image_templates:
- 'kanisterio/kanister-controller:{{ .Tag }}'
dockerfile: 'docker/controller/Dockerfile'
- binaries:
- kando
image_templates:
- 'kanisterio/kanister-tools:{{ .Tag }}'
dockerfile: 'docker/tools/Dockerfile'
- binaries:
- kando
image_templates:
Expand Down
6 changes: 6 additions & 0 deletions docker/controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM alpine:3.10
MAINTAINER Tom Manville<tom@kasten.io>
RUN apk -v --update add --no-cache ca-certificates && \
rm -f /var/cache/apk/*
ADD controller /controller
ENTRYPOINT ["/controller"]
3 changes: 2 additions & 1 deletion docker/postgres-kanister-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN apk -v --update add --no-cache curl python py-pip groff less && \
apk -v --purge del py-pip && \
rm -f /var/cache/apk/*

RUN curl https://raw.githubusercontent.com/kanisterio/kanister/master/scripts/get.sh | bash
COPY --from=restic/restic:0.9.5 /usr/bin/restic /usr/local/bin/restic
ADD kando /usr/local/bin/

CMD ["tail", "-f", "/dev/null"]
14 changes: 2 additions & 12 deletions docker/tools/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
FROM busybox:glibc as restbox

# Get restic executable
ENV RESTIC_VERSION=0.9.5
ENV RESTIC_SHA=08cd75e56a67161e9b16885816f04b2bf1fb5b03bc0677b0ccf3812781c1a2ec
ADD https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_linux_amd64.bz2 /
RUN echo "${RESTIC_SHA} restic_${RESTIC_VERSION}_linux_amd64.bz2" | sha256sum -c \
&& bzip2 -d restic_${RESTIC_VERSION}_linux_amd64.bz2 && mv restic_${RESTIC_VERSION}_linux_amd64 /bin/restic && chmod +x /bin/restic

FROM alpine:3.7
FROM alpine:3.10
MAINTAINER Tom Manville <tom@kasten.io>

COPY --from=restbox /bin/restic /bin/restic

RUN apk -v --update add --no-cache bash curl groff less mailcap ca-certificates && \
rm -f /var/cache/apk/*

COPY --from=restic/restic:0.9.5 /usr/bin/restic /usr/local/bin/restic
ADD kando /usr/local/bin/

CMD [ "/usr/bin/tail", "-f", "/dev/null" ]
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ADD ./examples/helm/kanister/kanister-mongodb-replicaset/image /kanister

RUN /kanister/install.sh && rm -rf /kanister && rm -rf /tmp && mkdir /tmp

RUN curl https://raw.githubusercontent.com/kanisterio/kanister/master/scripts/get.sh | bash
COPY --from=restic/restic:0.9.5 /usr/bin/restic /usr/local/bin/restic
ADD kando /usr/local/bin/

CMD ["tail", "-f", "/dev/null"]

0 comments on commit 334dd58

Please sign in to comment.