Put everything into one docker container
This commit is contained in:
parent
c7abe28ade
commit
165b9d795f
5 changed files with 50 additions and 96 deletions
|
@ -1,9 +1,20 @@
|
|||
FROM golang:stretch
|
||||
FROM python:3.6 as s3ql-deps
|
||||
LABEL maintainers="Cyrill Troxler <cyrilltroxler@gmail.com>"
|
||||
LABEL description="s3 fuse csi plugin"
|
||||
LABEL description="s3ql 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 \
|
||||
s3fs \
|
||||
build-essential \
|
||||
autoconf \
|
||||
libcurl4-openssl-dev \
|
||||
|
@ -11,20 +22,39 @@ RUN apt-get update && apt-get install -y \
|
|||
libexpat1-dev \
|
||||
libssl-dev \
|
||||
zlib1g-dev \
|
||||
xfsprogs \
|
||||
psmisc \
|
||||
pkg-config \
|
||||
git && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Compile & install s3backer
|
||||
RUN git clone https://github.com/archiecobbs/s3backer.git ./s3backer
|
||||
|
||||
WORKDIR "./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 <cyrilltroxler@gmail.com>"
|
||||
LABEL description="csi-s3-driver production image"
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
libfuse2 gcc sqlite3 libsqlite3-dev \
|
||||
s3fs psmisc procps libcurl3 xfsprogs && \
|
||||
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
|
||||
|
||||
COPY ./_output/s3driver /s3driver
|
||||
ENTRYPOINT ["/s3driver"]
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
# Note: s3fs does not work properly on alpine as of version 1.84: https://github.com/s3fs-fuse/s3fs-fuse/issues/750
|
||||
FROM alpine:3.7
|
||||
LABEL maintainers="Cyrill Troxler <cyrilltroxler@gmail.com>"
|
||||
LABEL description="s3 fuse csi plugin"
|
||||
ARG S3FS_VERSION=v1.84
|
||||
|
||||
RUN apk --update add ca-certificates fuse alpine-sdk automake autoconf libxml2-dev fuse-dev curl-dev git bash openssl-dev
|
||||
|
||||
RUN git clone https://github.com/s3fs-fuse/s3fs-fuse.git; \
|
||||
cd s3fs-fuse; \
|
||||
git checkout tags/${S3FS_VERSION}; \
|
||||
./autogen.sh; \
|
||||
./configure --prefix=/usr; \
|
||||
make; \
|
||||
make install; \
|
||||
rm -rf /var/cache/apk/*;
|
||||
|
||||
COPY ./_output/s3driver /s3driver
|
||||
ENTRYPOINT ["/s3driver"]
|
|
@ -1,23 +0,0 @@
|
|||
FROM debian:stretch
|
||||
LABEL maintainers="Cyrill Troxler <cyrilltroxler@gmail.com>"
|
||||
LABEL description="s3 fuse csi plugin"
|
||||
ARG S3QL_VERSION=release-2.28
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
s3fs wget psmisc procps python3 python3-setuptools \
|
||||
python3-dev python3-pip python3-llfuse pkg-config \
|
||||
sqlite3 libsqlite3-dev python3-apsw cython && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip3 install defusedxml dugong requests pycrypto
|
||||
|
||||
WORKDIR /usr/src
|
||||
RUN wget -q https://github.com/s3ql/s3ql/archive/${S3QL_VERSION}.tar.gz
|
||||
RUN tar -xzf ${S3QL_VERSION}.tar.gz
|
||||
WORKDIR /usr/src/s3ql-${S3QL_VERSION}
|
||||
RUN python3 setup.py build_cython build_ext --inplace
|
||||
RUN python3 setup.py install
|
||||
|
||||
COPY ./_output/s3driver /s3driver
|
||||
ENTRYPOINT ["/s3driver"]
|
|
@ -1,30 +1,20 @@
|
|||
FROM golang:stretch
|
||||
FROM ctrox/csi-s3-driver:0.2.0
|
||||
LABEL maintainers="Cyrill Troxler <cyrilltroxler@gmail.com>"
|
||||
LABEL description="s3 fuse csi plugin"
|
||||
LABEL description="csi-s3-driver testing image"
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
s3fs \
|
||||
build-essential \
|
||||
autoconf \
|
||||
libcurl4-openssl-dev \
|
||||
libfuse-dev \
|
||||
libexpat1-dev \
|
||||
libssl-dev \
|
||||
zlib1g-dev \
|
||||
xfsprogs \
|
||||
psmisc \
|
||||
git && \
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
git wget && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN git clone https://github.com/archiecobbs/s3backer.git ./s3backer
|
||||
RUN wget -q https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz && \
|
||||
tar -xf go1.10.3.linux-amd64.tar.gz && \
|
||||
mv go /usr/local
|
||||
|
||||
WORKDIR "./s3backer"
|
||||
|
||||
RUN ["./autogen.sh"]
|
||||
RUN ["./configure"]
|
||||
RUN ["make"]
|
||||
RUN ["make", "install"]
|
||||
ENV GOROOT /usr/local/go
|
||||
ENV GOPATH /go
|
||||
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH
|
||||
|
||||
RUN go get -u github.com/minio/minio && go install github.com/minio/minio/cmd
|
||||
|
||||
CMD ["/go/src/github.com/ctrox/csi-s3-driver/test/test.sh"]
|
||||
ENTRYPOINT ["/go/src/github.com/ctrox/csi-s3-driver/test/test.sh"]
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
FROM golang:stretch
|
||||
LABEL maintainers="Cyrill Troxler <cyrilltroxler@gmail.com>"
|
||||
LABEL description="s3 fuse csi plugin"
|
||||
ARG S3QL_VERSION=release-2.28
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
s3fs wget psmisc procps python3 python3-setuptools \
|
||||
python3-dev python3-pip python3-llfuse pkg-config \
|
||||
sqlite3 libsqlite3-dev python3-apsw cython && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip3 install defusedxml dugong requests pycrypto
|
||||
|
||||
WORKDIR /usr/src
|
||||
RUN wget -q https://github.com/s3ql/s3ql/archive/${S3QL_VERSION}.tar.gz
|
||||
RUN tar -xzf ${S3QL_VERSION}.tar.gz
|
||||
WORKDIR /usr/src/s3ql-${S3QL_VERSION}
|
||||
RUN python3 setup.py build_cython build_ext --inplace
|
||||
RUN python3 setup.py install
|
||||
|
||||
RUN go get -u github.com/minio/minio && go install github.com/minio/minio/cmd
|
||||
|
||||
CMD ["/go/src/github.com/ctrox/csi-s3-driver/test/test.sh"]
|
Loading…
Reference in a new issue