2016-05-04 08:18:52 +02:00
|
|
|
FROM golang:1.6.2
|
2016-02-01 12:59:10 +01:00
|
|
|
|
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-04-07 12:34:12 +02:00
|
|
|
WORKDIR /go/src/github.com/vmware/harbor/ui
|
2016-02-01 12:59:10 +01:00
|
|
|
|
2016-08-11 15:30:02 +02:00
|
|
|
RUN 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-07-13 11:23:43 +02:00
|
|
|
COPY Deploy/jsminify.sh /tmp/jsminify.sh
|
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 \
|
2016-07-13 11:23:43 +02:00
|
|
|
&& sed -i '$a\TLS_REQCERT allow' /etc/ldap/ldap.conf \
|
|
|
|
&& /tmp/jsminify.sh /go/bin/views/sections/script-include.htm /go/bin/static/resources/js/harbor.app.min.js
|
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
|
|
|
|
|