Set s3backer Dockerfile as default
This commit is contained in:
parent
1caf469966
commit
59481b756a
5 changed files with 70 additions and 48 deletions
4
Makefile
4
Makefile
|
@ -24,10 +24,10 @@ build:
|
||||||
if [ ! -d ./vendor ]; then dep ensure -vendor-only; fi
|
if [ ! -d ./vendor ]; then dep ensure -vendor-only; fi
|
||||||
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/s3driver ./cmd/s3driver
|
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/s3driver ./cmd/s3driver
|
||||||
test:
|
test:
|
||||||
docker build -t $(TEST_IMAGE_TAG) -f test/Dockerfile.s3backer .
|
docker build -t $(TEST_IMAGE_TAG) -f test/Dockerfile .
|
||||||
docker run --rm --privileged -v $(PWD):$(PROJECT_DIR):ro -v /dev:/dev $(TEST_IMAGE_TAG)
|
docker run --rm --privileged -v $(PWD):$(PROJECT_DIR):ro -v /dev:/dev $(TEST_IMAGE_TAG)
|
||||||
container: build
|
container: build
|
||||||
docker build -t $(IMAGE_TAG) -f cmd/s3driver/Dockerfile.s3ql .
|
docker build -t $(IMAGE_TAG) -f cmd/s3driver/Dockerfile .
|
||||||
push: container
|
push: container
|
||||||
docker push $(IMAGE_TAG)
|
docker push $(IMAGE_TAG)
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,8 +1,30 @@
|
||||||
FROM debian:stretch
|
FROM golang:stretch
|
||||||
LABEL maintainers="Cyrill Troxler <cyrilltroxler@gmail.com>"
|
LABEL maintainers="Cyrill Troxler <cyrilltroxler@gmail.com>"
|
||||||
LABEL description="s3 fuse csi plugin"
|
LABEL description="s3 fuse csi plugin"
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y s3fs && rm -rf /var/lib/apt/lists/*
|
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 && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Compile & install s3backer
|
||||||
|
RUN git clone https://github.com/archiecobbs/s3backer.git ./s3backer
|
||||||
|
|
||||||
|
WORKDIR "./s3backer"
|
||||||
|
|
||||||
|
RUN ./autogen.sh && \
|
||||||
|
./configure && \
|
||||||
|
make && \
|
||||||
|
make install
|
||||||
|
|
||||||
COPY ./_output/s3driver /s3driver
|
COPY ./_output/s3driver /s3driver
|
||||||
ENTRYPOINT ["/s3driver"]
|
ENTRYPOINT ["/s3driver"]
|
||||||
|
|
|
@ -1,23 +1,29 @@
|
||||||
FROM golang:stretch
|
FROM golang:stretch
|
||||||
LABEL maintainers="Cyrill Troxler <cyrilltroxler@gmail.com>"
|
LABEL maintainers="Cyrill Troxler <cyrilltroxler@gmail.com>"
|
||||||
LABEL description="s3 fuse csi plugin"
|
LABEL description="s3 fuse csi plugin"
|
||||||
ARG S3QL_VERSION=release-2.28
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && apt-get install -y \
|
||||||
apt-get install -y \
|
s3fs \
|
||||||
s3fs wget psmisc procps python3 python3-setuptools \
|
build-essential \
|
||||||
python3-dev python3-pip python3-llfuse pkg-config \
|
autoconf \
|
||||||
sqlite3 libsqlite3-dev python3-apsw cython && \
|
libcurl4-openssl-dev \
|
||||||
rm -rf /var/lib/apt/lists/*
|
libfuse-dev \
|
||||||
|
libexpat1-dev \
|
||||||
|
libssl-dev \
|
||||||
|
zlib1g-dev \
|
||||||
|
xfsprogs \
|
||||||
|
psmisc \
|
||||||
|
git && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN pip3 install defusedxml dugong requests pycrypto
|
RUN git clone https://github.com/archiecobbs/s3backer.git ./s3backer
|
||||||
|
|
||||||
WORKDIR /usr/src
|
WORKDIR "./s3backer"
|
||||||
RUN wget -q https://github.com/s3ql/s3ql/archive/${S3QL_VERSION}.tar.gz
|
|
||||||
RUN tar -xzf ${S3QL_VERSION}.tar.gz
|
RUN ["./autogen.sh"]
|
||||||
WORKDIR /usr/src/s3ql-${S3QL_VERSION}
|
RUN ["./configure"]
|
||||||
RUN python3 setup.py build_cython build_ext --inplace
|
RUN ["make"]
|
||||||
RUN python3 setup.py install
|
RUN ["make", "install"]
|
||||||
|
|
||||||
RUN go get -u github.com/minio/minio && go install github.com/minio/minio/cmd
|
RUN go get -u github.com/minio/minio && go install github.com/minio/minio/cmd
|
||||||
|
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
FROM golang:stretch
|
|
||||||
LABEL maintainers="Cyrill Troxler <cyrilltroxler@gmail.com>"
|
|
||||||
LABEL description="s3 fuse csi plugin"
|
|
||||||
|
|
||||||
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 && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN git clone https://github.com/archiecobbs/s3backer.git ./s3backer
|
|
||||||
|
|
||||||
WORKDIR "./s3backer"
|
|
||||||
|
|
||||||
RUN ["./autogen.sh"]
|
|
||||||
RUN ["./configure"]
|
|
||||||
RUN ["make"]
|
|
||||||
RUN ["make", "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"]
|
|
24
test/Dockerfile.s3ql
Normal file
24
test/Dockerfile.s3ql
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
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