2016-02-01 12:59:10 +01:00
|
|
|
FROM golang:1.5.1
|
|
|
|
|
2016-02-17 04:27:23 +01:00
|
|
|
MAINTAINER jiangd@vmware.com
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y libldap2-dev \
|
|
|
|
&& rm -r /var/lib/apt/lists/*
|
2016-02-01 12:59:10 +01:00
|
|
|
|
|
|
|
COPY . /go/src/github.com/vmware/harbor
|
2016-02-19 06:01:58 +01:00
|
|
|
#golang.org is blocked in China
|
|
|
|
COPY ./vendor/golang.org /go/src/golang.org
|
2016-04-07 12:34:12 +02:00
|
|
|
WORKDIR /go/src/github.com/vmware/harbor/ui
|
2016-02-01 12:59:10 +01:00
|
|
|
|
2016-02-19 06:01:58 +01:00
|
|
|
ENV GO15VENDOREXPERIMENT 1
|
|
|
|
RUN go get -d github.com/docker/distribution \
|
|
|
|
&& go get -d github.com/docker/libtrust \
|
2016-02-22 03:46:09 +01:00
|
|
|
&& go get -d github.com/go-sql-driver/mysql \
|
2016-04-07 12:34:12 +02:00
|
|
|
&& go build -v -a -o /go/bin/harbor_ui
|
2016-02-01 12:59:10 +01:00
|
|
|
|
2016-02-17 04:27:23 +01:00
|
|
|
ENV MYSQL_USR root \
|
|
|
|
MYSQL_PWD root \
|
|
|
|
REGISTRY_URL localhost:5000
|
2016-02-01 12:59:10 +01:00
|
|
|
|
2016-02-17 04:27:23 +01:00
|
|
|
COPY views /go/bin/views
|
|
|
|
COPY static /go/bin/static
|
2016-03-11 07:34:56 +01:00
|
|
|
COPY favicon.ico /go/bin/favicon.ico
|
2016-02-01 12:59:10 +01:00
|
|
|
|
2016-04-07 12:34:12 +02:00
|
|
|
RUN chmod u+x /go/bin/harbor_ui \
|
2016-02-17 04:27:23 +01:00
|
|
|
&& sed -i 's/TLS_CACERT/#TLS_CAERT/g' /etc/ldap/ldap.conf \
|
|
|
|
&& sed -i '$a\TLS_REQCERT allow' /etc/ldap/ldap.conf
|
2016-02-01 12:59:10 +01:00
|
|
|
|
|
|
|
WORKDIR /go/bin/
|
2016-04-07 12:34:12 +02:00
|
|
|
ENTRYPOINT ["/go/bin/harbor_ui"]
|
2016-02-01 12:59:10 +01:00
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|