mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 02:05:41 +01:00
update dockerfile and compose template
This commit is contained in:
parent
f859348ac6
commit
a8fde4d97a
@ -18,7 +18,7 @@ registry:
|
||||
log_driver: "syslog"
|
||||
log_opt:
|
||||
syslog-address: "tcp://127.0.0.1:1514"
|
||||
tag: "{{.Name}}"
|
||||
syslog-tag: "registry"
|
||||
mysql:
|
||||
build: ./db/
|
||||
volumes:
|
||||
@ -30,7 +30,7 @@ mysql:
|
||||
log_driver: "syslog"
|
||||
log_opt:
|
||||
syslog-address: "tcp://127.0.0.1:1514"
|
||||
tag: "{{.Name}}"
|
||||
syslog-tag: "mysql"
|
||||
ui:
|
||||
build: ../
|
||||
env_file:
|
||||
@ -44,7 +44,7 @@ ui:
|
||||
log_driver: "syslog"
|
||||
log_opt:
|
||||
syslog-address: "tcp://127.0.0.1:1514"
|
||||
tag: "{{.Name}}"
|
||||
syslog-tag: "ui"
|
||||
proxy:
|
||||
image: library/nginx:1.9
|
||||
volumes:
|
||||
@ -58,4 +58,4 @@ proxy:
|
||||
log_driver: "syslog"
|
||||
log_opt:
|
||||
syslog-address: "tcp://127.0.0.1:1514"
|
||||
tag: "{{.Name}}"
|
||||
syslog-tag: "proxy"
|
||||
|
29
Dockerfile
29
Dockerfile
@ -1,6 +1,10 @@
|
||||
FROM golang:1.5.1
|
||||
|
||||
RUN apt-get update -qqy && apt-get install -qqy libldap2-dev
|
||||
MAINTAINER jiangd@vmware.com
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y libldap2-dev \
|
||||
&& rm -r /var/lib/apt/lists/*
|
||||
|
||||
COPY . /go/src/github.com/vmware/harbor
|
||||
WORKDIR /go/src/github.com/vmware/harbor
|
||||
@ -8,20 +12,19 @@ WORKDIR /go/src/github.com/vmware/harbor
|
||||
ENV GOPATH /go/src/github.com/vmware/harbor/Godeps/_workspace:$GOPATH
|
||||
RUN go install -v -a
|
||||
|
||||
ENV MYSQL_USR root
|
||||
ENV MYSQL_PWD root
|
||||
ENV MYSQL_PORT_3306_TCP_ADDR localhost
|
||||
ENV MYSQL_PORT_3306_TCP_PORT 3306
|
||||
ENV REGISTRY_URL localhost:5000
|
||||
ENV MYSQL_USR root \
|
||||
MYSQL_PWD root \
|
||||
MYSQL_PORT_3306_TCP_ADDR localhost \
|
||||
MYSQL_PORT_3306_TCP_PORT 3306 \
|
||||
REGISTRY_URL localhost:5000
|
||||
|
||||
ADD conf /go/bin/conf
|
||||
ADD views /go/bin/views
|
||||
ADD static /go/bin/static
|
||||
COPY conf /go/bin/conf
|
||||
COPY views /go/bin/views
|
||||
COPY static /go/bin/static
|
||||
|
||||
RUN chmod u+x /go/bin/harbor
|
||||
|
||||
RUN sed -i 's/TLS_CACERT/#TLS_CAERT/g' /etc/ldap/ldap.conf
|
||||
RUN sed -i '$a\TLS_REQCERT allow' /etc/ldap/ldap.conf
|
||||
RUN chmod u+x /go/bin/harbor \
|
||||
&& sed -i 's/TLS_CACERT/#TLS_CAERT/g' /etc/ldap/ldap.conf \
|
||||
&& sed -i '$a\TLS_REQCERT allow' /etc/ldap/ldap.conf
|
||||
|
||||
WORKDIR /go/bin/
|
||||
ENTRYPOINT ["/go/bin/harbor"]
|
||||
|
Loading…
Reference in New Issue
Block a user