harbor/make/dev/ui/Dockerfile

29 lines
792 B
Docker
Raw Normal View History

FROM golang:1.7.3
2016-02-01 12:59:10 +01:00
2016-02-17 04:27:23 +01:00
MAINTAINER jiangd@vmware.com
2016-10-19 08:32:00 +02:00
COPY src/. /go/src/github.com/vmware/harbor/src
WORKDIR /go/src/github.com/vmware/harbor/src/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-10-19 08:32:00 +02:00
COPY src/ui/views /go/bin/views
COPY src/ui/static /go/bin/static
COPY src/favicon.ico /go/bin/favicon.ico
COPY make/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 \
&& timestamp=`date '+%s'` \
&& /tmp/jsminify.sh /go/bin/views/sections/script-include.htm /go/bin/static/resources/js/harbor.app.min.$timestamp.js /go/bin/ \
&& sed -i "s/harbor\.app\.min\.js/harbor\.app\.min\.$timestamp\.js/g" /go/bin/views/sections/script-min-include.htm
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