-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from ctrox/secrets
Supply credentials using volume secrets instead of cli config
- Loading branch information
Showing
29 changed files
with
357 additions
and
464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,20 @@ | ||
FROM python:3.6 as s3ql-deps | ||
FROM debian:stretch | ||
LABEL maintainers="Cyrill Troxler <[email protected]>" | ||
LABEL description="s3ql dependencies" | ||
LABEL description="csi-s3 slim image" | ||
|
||
# s3fs and some other dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
python3 python3-setuptools \ | ||
python3-dev python3-pip pkg-config cython \ | ||
libfuse-dev libattr1-dev && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN pip3 install llfuse apsw defusedxml dugong requests pycrypto | ||
|
||
FROM debian:stretch as s3backer | ||
ARG S3BACKER_VERSION=1.5.0 | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
build-essential \ | ||
autoconf \ | ||
libcurl4-openssl-dev \ | ||
libfuse-dev \ | ||
libexpat1-dev \ | ||
libssl-dev \ | ||
zlib1g-dev \ | ||
psmisc \ | ||
pkg-config \ | ||
git && \ | ||
apt-get install -y \ | ||
s3fs curl unzip && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Compile & install s3backer | ||
RUN git clone https://github.com/archiecobbs/s3backer.git /src/s3backer | ||
WORKDIR /src/s3backer | ||
RUN git checkout tags/${S3BACKER_VERSION} | ||
|
||
RUN ./autogen.sh && \ | ||
./configure && \ | ||
make && \ | ||
make install | ||
|
||
FROM python:3.6-slim | ||
LABEL maintainers="Cyrill Troxler <[email protected]>" | ||
LABEL description="csi-s3 production image" | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
libfuse2 gcc sqlite3 libsqlite3-dev \ | ||
s3fs psmisc procps libcurl3 xfsprogs wget unzip && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ARG S3QL_VERSION=2.29 | ||
ENV S3QL_URL=https://github.com/s3ql/s3ql/releases/download/release-${S3QL_VERSION}/s3ql-${S3QL_VERSION}.tar.bz2 | ||
|
||
COPY --from=s3ql-deps /root/.cache /root/.cache | ||
COPY --from=s3ql-deps /usr/local/lib/python3.6/site-packages /usr/local/lib/python3.6/site-packages | ||
RUN pip install ${S3QL_URL} && rm -rf /root/.cache | ||
|
||
COPY --from=s3backer /usr/bin/s3backer /usr/bin/s3backer | ||
|
||
# install rclone | ||
ARG RCLONE_VERSION=v1.46 | ||
ARG RCLONE_VERSION=v1.47.0 | ||
RUN cd /tmp \ | ||
&& wget -q https://downloads.rclone.org/${RCLONE_VERSION}/rclone-${RCLONE_VERSION}-linux-amd64.zip \ | ||
&& unzip /tmp/rclone-${RCLONE_VERSION}-linux-amd64.zip \ | ||
&& mv /tmp/rclone-*-linux-amd64/rclone /usr/bin \ | ||
&& rm -r /tmp/rclone* | ||
&& curl -O https://downloads.rclone.org/${RCLONE_VERSION}/rclone-${RCLONE_VERSION}-linux-amd64.zip \ | ||
&& unzip /tmp/rclone-${RCLONE_VERSION}-linux-amd64.zip \ | ||
&& mv /tmp/rclone-*-linux-amd64/rclone /usr/bin \ | ||
&& rm -r /tmp/rclone* | ||
|
||
COPY ./_output/s3driver /s3driver | ||
ENTRYPOINT ["/s3driver"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM debian:stretch as s3backer | ||
ARG S3BACKER_VERSION=1.5.0 | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
build-essential \ | ||
autoconf \ | ||
libcurl4-openssl-dev \ | ||
libfuse-dev \ | ||
libexpat1-dev \ | ||
libssl-dev \ | ||
zlib1g-dev \ | ||
psmisc \ | ||
pkg-config \ | ||
git && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Compile & install s3backer | ||
RUN git clone https://github.com/archiecobbs/s3backer.git /src/s3backer | ||
WORKDIR /src/s3backer | ||
RUN git checkout tags/${S3BACKER_VERSION} | ||
|
||
RUN ./autogen.sh && \ | ||
./configure && \ | ||
make && \ | ||
make install | ||
|
||
FROM debian:stretch | ||
LABEL maintainers="Cyrill Troxler <[email protected]>" | ||
LABEL description="csi-s3 image" | ||
COPY --from=s3backer /usr/bin/s3backer /usr/bin/s3backer | ||
|
||
# s3fs and some other dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
libfuse2 gcc sqlite3 libsqlite3-dev \ | ||
s3fs psmisc procps libcurl3 xfsprogs curl unzip && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# install rclone | ||
ARG RCLONE_VERSION=v1.47.0 | ||
RUN cd /tmp \ | ||
&& curl -O https://downloads.rclone.org/${RCLONE_VERSION}/rclone-${RCLONE_VERSION}-linux-amd64.zip \ | ||
&& unzip /tmp/rclone-${RCLONE_VERSION}-linux-amd64.zip \ | ||
&& mv /tmp/rclone-*-linux-amd64/rclone /usr/bin \ | ||
&& rm -r /tmp/rclone* | ||
|
||
COPY ./_output/s3driver /s3driver | ||
ENTRYPOINT ["/s3driver"] |
Oops, something went wrong.