-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
50 lines (37 loc) · 1.48 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM ubuntu:16.04
LABEL maintainer="John Jacquay <[email protected]>"
ENV GOPATH /go
ENV GOINSTALL /usr/local/go
ENV PATH $PATH:$GOINSTALL/bin:$GOPATH/bin
ENV CGO_LDFLAGS_ALLOW .*
ENV MINIO_UPDATE off
ENV MINIO_ACCESS_KEY_FILE=access_key \
MINIO_SECRET_KEY_FILE=secret_key
WORKDIR /go/src/github.com/minio/
RUN apt-get update
RUN apt-get install -y wget git build-essential
# Install Go
RUN wget https://dl.google.com/go/go1.12.7.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go1.12.7.linux-amd64.tar.gz
RUN rm -rf go1.12.7.linux-amd64.tar.gz
# Install iRODS + GoRODS
RUN apt-get install -y lsb-release apt-transport-https libxml2
RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add -
RUN echo "deb [arch=amd64] https://packages.irods.org/apt/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/renci-irods.list
RUN apt-get update
RUN apt-get install -y irods-externals* irods-runtime irods-dev libssl-dev
RUN go get -u github.com/jjacquay712/GoRODS
# Install Minio plus iRODS gateway patch
ENV GO111MODULE on
RUN git clone https://github.com/minio/minio
WORKDIR "minio"
COPY gateway.go cmd/gateway/
COPY irods cmd/gateway/irods
RUN go install -v -ldflags "$(go run buildscripts/gen-ldflags.go)"
RUN go build -tags kqueue -ldflags "-s -w" -o /usr/bin/healthcheck dockerscripts/healthcheck.go
RUN cp dockerscripts/docker-entrypoint.sh /usr/bin/
EXPOSE 9000
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
VOLUME ["/data"]
HEALTHCHECK --interval=1m CMD healthcheck
CMD ["minio"]