mirror of
https://github.com/Quiq/docker-registry-ui.git
synced 2025-09-29 14:25:19 +00:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
32d8ab87bd | ||
|
7a3bc551b3 | ||
|
7a752d3f8d | ||
|
80bdad8c91 | ||
|
734afe56b5 | ||
|
0f6bf65015 | ||
|
7525e87c1a | ||
|
1b8c502a60 |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,5 +1,16 @@
|
||||
## Changelog
|
||||
|
||||
### 0.7.4 (2018-10-30)
|
||||
|
||||
* Switch to Go 1.11 and Go Modules to track dependencies.
|
||||
|
||||
### 0.7.3 (2018-08-14)
|
||||
|
||||
* Add `registry_password_file` option to the config file.
|
||||
* Improve no data message on empty tables on UI.
|
||||
* Show the root namespace "library" in the dropdown even when there are no repos in it.
|
||||
* Switch alpine Docker image to 3.8.
|
||||
|
||||
### 0.7.2 (2018-07-30)
|
||||
|
||||
* Make web root accessible w/o trailing slash when base_path is configured.
|
||||
|
23
Dockerfile
23
Dockerfile
@@ -1,24 +1,21 @@
|
||||
FROM golang:1.10.3-alpine as builder
|
||||
FROM golang:1.11.1-alpine3.8 as builder
|
||||
|
||||
ENV GOPATH /opt
|
||||
ENV GO111MODULE on
|
||||
|
||||
RUN apk update && \
|
||||
apk add ca-certificates git build-base && \
|
||||
go get github.com/Masterminds/glide
|
||||
apk add ca-certificates git bash gcc musl-dev
|
||||
|
||||
ADD glide.* /opt/src/github.com/quiq/docker-registry-ui/
|
||||
RUN cd /opt/src/github.com/quiq/docker-registry-ui && \
|
||||
/opt/bin/glide install
|
||||
WORKDIR /opt/src/github.com/quiq/docker-registry-ui
|
||||
ADD events events
|
||||
ADD registry registry
|
||||
ADD *.go go.mod go.sum ./
|
||||
|
||||
ADD events /opt/src/github.com/quiq/docker-registry-ui/events
|
||||
ADD registry /opt/src/github.com/quiq/docker-registry-ui/registry
|
||||
ADD *.go /opt/src/github.com/quiq/docker-registry-ui/
|
||||
RUN cd /opt/src/github.com/quiq/docker-registry-ui && \
|
||||
go test -v ./registry && \
|
||||
go build -o /opt/docker-registry-ui github.com/quiq/docker-registry-ui
|
||||
RUN go test -v ./registry && \
|
||||
go build -o /opt/docker-registry-ui *.go
|
||||
|
||||
|
||||
FROM alpine:3.7
|
||||
FROM alpine:3.8
|
||||
|
||||
WORKDIR /opt
|
||||
RUN apk add --no-cache ca-certificates && \
|
||||
|
10
Makefile
Executable file
10
Makefile
Executable file
@@ -0,0 +1,10 @@
|
||||
IMAGE=quiq/docker-registry-ui
|
||||
VERSION=`sed -n '/version/ s/.* = //;s/"//g p' version.go`
|
||||
|
||||
.DEFAULT: build
|
||||
|
||||
build:
|
||||
@docker build -t ${IMAGE}:${VERSION} .
|
||||
@echo
|
||||
@echo "The image has been built: ${IMAGE}:${VERSION}"
|
||||
@echo
|
@@ -12,8 +12,11 @@ verify_tls: true
|
||||
# They need to have a full access to the registry.
|
||||
# If token authentication service is enabled, it will be auto-discovered and those credentials
|
||||
# will be used to obtain access tokens.
|
||||
# When the registry_password_file entry is used, the password can be passed as a docker secret
|
||||
# and read from file. This overides the registry_password entry.
|
||||
registry_username: user
|
||||
registry_password: pass
|
||||
# registry_password_file: /run/secrets/registry_password_file
|
||||
|
||||
# Event listener token.
|
||||
# The same one should be configured on Docker registry as Authorization Bearer token.
|
||||
|
80
glide.lock
generated
80
glide.lock
generated
@@ -1,80 +0,0 @@
|
||||
hash: fea96c473a02b07acc1d600ee0f71c6a5143f34e5eb04a4c5e3e14378fca46f0
|
||||
updated: 2018-06-09T09:03:51.972089+09:00
|
||||
imports:
|
||||
- name: github.com/CloudyKit/fastprinter
|
||||
version: 74b38d55f37af5d6c05ca11147d616b613a3420e
|
||||
- name: github.com/CloudyKit/jet
|
||||
version: 2b064536b25ab0e9c54245f9e2cc5bd4766033fe
|
||||
- name: github.com/dgrijalva/jwt-go
|
||||
version: 06ea1031745cb8b3dab3f6a236daf2b0aa468b7e
|
||||
- name: github.com/go-sql-driver/mysql
|
||||
version: 64db0f7ebe171b596aa9b26f39a79f7413a3b617
|
||||
- name: github.com/hhkbp2/go-logging
|
||||
version: 377ba05d98977baa2a0d9e13f13aac2f3a47ac4d
|
||||
- name: github.com/hhkbp2/go-strftime
|
||||
version: d82166ec6782f870431668391c2e321069632fe7
|
||||
- name: github.com/labstack/echo
|
||||
version: 6d227dfea4d2e52cb76856120b3c17f758139b4e
|
||||
subpackages:
|
||||
- middleware
|
||||
- name: github.com/labstack/gommon
|
||||
version: 0a22a0df01a7c84944c607e8a6e91cfe421ea7ed
|
||||
subpackages:
|
||||
- bytes
|
||||
- color
|
||||
- log
|
||||
- random
|
||||
- name: github.com/mattn/go-colorable
|
||||
version: efa589957cd060542a26d2dd7832fd6a6c6c3ade
|
||||
- name: github.com/mattn/go-isatty
|
||||
version: 6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c
|
||||
- name: github.com/mattn/go-sqlite3
|
||||
version: 323a32be5a2421b8c7087225079c6c900ec397cd
|
||||
- name: github.com/moul/http2curl
|
||||
version: 9ac6cf4d929b2fa8fd2d2e6dec5bb0feb4f4911d
|
||||
- name: github.com/parnurzeal/gorequest
|
||||
version: a578a48e8d6ca8b01a3b18314c43c6716bb5f5a3
|
||||
- name: github.com/pkg/errors
|
||||
version: 816c9085562cd7ee03e7f8188a1cfd942858cded
|
||||
- name: github.com/robfig/cron
|
||||
version: b41be1df696709bb6395fe435af20370037c0b4c
|
||||
- name: github.com/tidwall/gjson
|
||||
version: 01f00f129617a6fe98941fb920d6c760241b54d2
|
||||
- name: github.com/tidwall/match
|
||||
version: 1731857f09b1f38450e2c12409748407822dc6be
|
||||
- name: github.com/valyala/bytebufferpool
|
||||
version: e746df99fe4a3986f4d4f79e13c1e0117ce9c2f7
|
||||
- name: github.com/valyala/fasttemplate
|
||||
version: dcecefd839c4193db0d35b88ec65b4c12d360ab0
|
||||
- name: golang.org/x/crypto
|
||||
version: 1a580b3eff7814fc9b40602fd35256c63b50f491
|
||||
subpackages:
|
||||
- acme
|
||||
- acme/autocert
|
||||
- name: golang.org/x/net
|
||||
version: dfa909b99c79129e1100513e5cd36307665e5723
|
||||
subpackages:
|
||||
- publicsuffix
|
||||
- name: golang.org/x/sys
|
||||
version: 7c87d13f8e835d2fb3a70a2912c811ed0c1d241b
|
||||
subpackages:
|
||||
- unix
|
||||
- name: google.golang.org/appengine
|
||||
version: b1f26356af11148e710935ed1ac8a7f5702c7612
|
||||
subpackages:
|
||||
- cloudsql
|
||||
- name: gopkg.in/yaml.v2
|
||||
version: 5420a8b6744d3b0345ab293f6fcba19c978f1183
|
||||
testImports:
|
||||
- name: github.com/jtolds/gls
|
||||
version: 9a4a02dbe491bef4bab3c24fd9f3087d6c4c6690
|
||||
- name: github.com/smartystreets/assertions
|
||||
version: 01fedaa993c0a9f9aa55111501cd7c81a49e812e
|
||||
subpackages:
|
||||
- internal/oglematchers
|
||||
- name: github.com/smartystreets/goconvey
|
||||
version: d4c757aa9afd1e2fc1832aaab209b5794eb336e1
|
||||
subpackages:
|
||||
- convey
|
||||
- convey/gotest
|
||||
- convey/reporting
|
23
glide.yaml
23
glide.yaml
@@ -1,23 +0,0 @@
|
||||
package: github.com/quiq/docker-registry-ui
|
||||
import:
|
||||
- package: github.com/CloudyKit/jet
|
||||
version: v2.1.2
|
||||
- package: github.com/labstack/echo
|
||||
version: v3.3.5
|
||||
subpackages:
|
||||
- middleware
|
||||
- package: github.com/parnurzeal/gorequest
|
||||
version: v0.2.15
|
||||
- package: github.com/hhkbp2/go-logging
|
||||
- package: github.com/tidwall/gjson
|
||||
version: v1.1.0
|
||||
- package: github.com/mattn/go-sqlite3
|
||||
version: 1.7.0
|
||||
- package: github.com/go-sql-driver/mysql
|
||||
- package: github.com/robfig/cron
|
||||
version: ~1.1.0
|
||||
testImport:
|
||||
- package: github.com/smartystreets/goconvey
|
||||
version: 1.6.2
|
||||
subpackages:
|
||||
- convey
|
31
go.mod
Normal file
31
go.mod
Normal file
@@ -0,0 +1,31 @@
|
||||
module github.com/quiq/docker-registry-ui
|
||||
|
||||
require (
|
||||
github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a // indirect
|
||||
github.com/CloudyKit/jet v2.1.2+incompatible
|
||||
github.com/elazarl/goproxy v0.0.0-20181003060214-f58a169a71a5 // indirect
|
||||
github.com/go-sql-driver/mysql v0.0.0-20180526092451-64db0f7ebe17
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect
|
||||
github.com/hhkbp2/go-logging v0.0.0-20171106042747-377ba05d9897
|
||||
github.com/hhkbp2/go-strftime v0.0.0-20150709091403-d82166ec6782 // indirect
|
||||
github.com/hhkbp2/testify v0.0.0-20150512090439-112845ebc045 // indirect
|
||||
github.com/jtolds/gls v4.2.1+incompatible // indirect
|
||||
github.com/labstack/echo v0.0.0-20180911044237-1abaa3049251
|
||||
github.com/labstack/gommon v0.0.0-20180506140623-0a22a0df01a7 // indirect
|
||||
github.com/mattn/go-isatty v0.0.4 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.7.0
|
||||
github.com/moul/http2curl v0.0.0-20170919181001-9ac6cf4d929b // indirect
|
||||
github.com/parnurzeal/gorequest v0.2.15
|
||||
github.com/pkg/errors v0.0.0-20180311214515-816c9085562c // indirect
|
||||
github.com/robfig/cron v0.0.0-20180505203441-b41be1df6967
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
|
||||
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a
|
||||
github.com/tidwall/gjson v1.1.0
|
||||
github.com/tidwall/match v0.0.0-20171002075945-1731857f09b1 // indirect
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20180515001509-1a580b3eff78 // indirect
|
||||
golang.org/x/net v0.0.0-20180524181706-dfa909b99c79 // indirect
|
||||
golang.org/x/sys v0.0.0-20180514143608-7c87d13f8e83 // indirect
|
||||
google.golang.org/appengine v1.1.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.1
|
||||
)
|
73
go.sum
Normal file
73
go.sum
Normal file
@@ -0,0 +1,73 @@
|
||||
github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a h1:3SgJcK9l5uPdBC/X17wanyJAMxM33+4ZhEIV96MIH8U=
|
||||
github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw=
|
||||
github.com/CloudyKit/jet v2.1.2+incompatible h1:ybZoYzMBdoijK6I+Ke3vg9GZsmlKo/ZhKdNMWz0P26c=
|
||||
github.com/CloudyKit/jet v2.1.2+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/elazarl/goproxy v0.0.0-20181003060214-f58a169a71a5 h1:LCoguo7Zd0MByKMbQbTvcZw7HiBcbvew+MOcwsJVwrY=
|
||||
github.com/elazarl/goproxy v0.0.0-20181003060214-f58a169a71a5/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
||||
github.com/go-sql-driver/mysql v0.0.0-20180526092451-64db0f7ebe17 h1:0J5ldStBfM6jDep4uzPGSC1Tqwk3UVDW1QPAaIxPhAQ=
|
||||
github.com/go-sql-driver/mysql v0.0.0-20180526092451-64db0f7ebe17/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/hhkbp2/go-logging v0.0.0-20171106042747-377ba05d9897 h1:0vxLTAKJQ8n7revuQ11xssUZbuyGwMuDGMRdaxrviuM=
|
||||
github.com/hhkbp2/go-logging v0.0.0-20171106042747-377ba05d9897/go.mod h1:zAp/KbVJna4DHUdeSPYGsRNn9c62x569NIr9ssBuZ/I=
|
||||
github.com/hhkbp2/go-strftime v0.0.0-20150709091403-d82166ec6782 h1:Evl9i7wBY3bjJ3NqHs0ldhnKOdQL4Kaum9ve1JAmiCE=
|
||||
github.com/hhkbp2/go-strftime v0.0.0-20150709091403-d82166ec6782/go.mod h1:x8/IOQ5qQ4DKfiTmD9wBhQ40edg5wh7gMRwdLg07mMw=
|
||||
github.com/hhkbp2/testify v0.0.0-20150512090439-112845ebc045 h1:MmQwR3zANTXzs2yZexVBDY6qcH2vJXOl/2dZFkWVM7w=
|
||||
github.com/hhkbp2/testify v0.0.0-20150512090439-112845ebc045/go.mod h1:8DUHF4igllRoOCbQKJsylsDqROcRtPTdb+SQUfjCYLo=
|
||||
github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE=
|
||||
github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/labstack/echo v0.0.0-20180911044237-1abaa3049251 h1:4q++nZ4OEtmbHazhA/7i3T9B+CBWtnHpuMMcW55ZjRk=
|
||||
github.com/labstack/echo v0.0.0-20180911044237-1abaa3049251/go.mod h1:rWD2DNQgFb1IY9lVYZVLWn2Ko4dyHZ/LpHORyBLP3hI=
|
||||
github.com/labstack/gommon v0.0.0-20180312174116-6fe1405d73ec/go.mod h1:/tj9csK2iPSBvn+3NLM9e52usepMtrd5ilFYA+wQNJ4=
|
||||
github.com/labstack/gommon v0.0.0-20180506140623-0a22a0df01a7 h1:zBqzrh1EkrO1zj/pDGT+UrB1M1Ihzqjc0K9MOynW2tI=
|
||||
github.com/labstack/gommon v0.0.0-20180506140623-0a22a0df01a7/go.mod h1:/tj9csK2iPSBvn+3NLM9e52usepMtrd5ilFYA+wQNJ4=
|
||||
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-sqlite3 v1.7.0 h1:CiYZ8slwBLIMkDbDJCF+Zd2M8bZ1Gz02TMsm1V33Lk0=
|
||||
github.com/mattn/go-sqlite3 v1.7.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/moul/http2curl v0.0.0-20170919181001-9ac6cf4d929b h1:Pip12xNtMvEFUBF4f8/b5yRXj94LLrNdLWELfOr2KcY=
|
||||
github.com/moul/http2curl v0.0.0-20170919181001-9ac6cf4d929b/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=
|
||||
github.com/parnurzeal/gorequest v0.2.15 h1:oPjDCsF5IkD4gUk6vIgsxYNaSgvAnIh1EJeROn3HdJU=
|
||||
github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE=
|
||||
github.com/pkg/errors v0.0.0-20180311214515-816c9085562c h1:F5RoIh7F9wB47PvXvpP1+Ihq1TkyC8iRdvwfKkESEZQ=
|
||||
github.com/pkg/errors v0.0.0-20180311214515-816c9085562c/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/robfig/cron v0.0.0-20180505203441-b41be1df6967 h1:x7xEyJDP7Hv3LVgvWhzioQqbC/KtuUhTigKlH/8ehhE=
|
||||
github.com/robfig/cron v0.0.0-20180505203441-b41be1df6967/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo=
|
||||
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
|
||||
github.com/stretchr/testify v1.2.1 h1:52QO5WkIUcHGIR7EnGagH88x1bUzqGXTC5/1bDTUQ7U=
|
||||
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/tidwall/gjson v1.1.0 h1:/7OBSUzFP8NhuzLlHg0vETJrRL02C++0ql5uSY3DITs=
|
||||
github.com/tidwall/gjson v1.1.0/go.mod h1:c/nTNbUr0E0OrXEhq1pwa8iEgc2DOt4ZZqAt1HtCkPA=
|
||||
github.com/tidwall/match v0.0.0-20171002075945-1731857f09b1 h1:pWIN9LOlFRCJFqWIOEbHLvY0WWJddsjH2FQ6N0HKZdU=
|
||||
github.com/tidwall/match v0.0.0-20171002075945-1731857f09b1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
|
||||
github.com/valyala/bytebufferpool v0.0.0-20160817181652-e746df99fe4a/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4 h1:gKMu1Bf6QINDnvyZuTaACm9ofY+PRh+5vFz4oxBZeF8=
|
||||
github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4/go.mod h1:50wTf68f99/Zt14pr046Tgt3Lp2vLyFZKzbFXTOabXw=
|
||||
golang.org/x/crypto v0.0.0-20180312195533-182114d58262/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20180515001509-1a580b3eff78 h1:uJIReYEB1ZZLarzi83Pmig1HhZ/cwFCysx05l0PFBIk=
|
||||
golang.org/x/crypto v0.0.0-20180515001509-1a580b3eff78/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/net v0.0.0-20180524181706-dfa909b99c79 h1:1FDlG4HI84rVePw1/0E/crL5tt2N+1blLJpY6UZ6krs=
|
||||
golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/sys v0.0.0-20180312081825-c28acc882ebc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180514143608-7c87d13f8e83 h1:RBQVaDuCnVU3bRWKyzSxMStfh2k1xl+FdtjOsarwO28=
|
||||
golang.org/x/sys v0.0.0-20180514143608-7c87d13f8e83/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
12
main.go
12
main.go
@@ -26,6 +26,7 @@ type configData struct {
|
||||
VerifyTLS bool `yaml:"verify_tls"`
|
||||
Username string `yaml:"registry_username"`
|
||||
Password string `yaml:"registry_password"`
|
||||
PasswordFile string `yaml:"registry_password_file"`
|
||||
EventListenerToken string `yaml:"event_listener_token"`
|
||||
EventRetentionDays int `yaml:"event_retention_days"`
|
||||
EventDatabaseDriver string `yaml:"event_database_driver"`
|
||||
@@ -86,6 +87,17 @@ func main() {
|
||||
a.config.BasePath = a.config.BasePath[0 : len(a.config.BasePath)-1]
|
||||
}
|
||||
}
|
||||
// Read password from file.
|
||||
if a.config.PasswordFile != "" {
|
||||
if _, err := os.Stat(a.config.PasswordFile); os.IsNotExist(err) {
|
||||
panic(err)
|
||||
}
|
||||
passwordBytes, err := ioutil.ReadFile(a.config.PasswordFile)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
a.config.Password = strings.TrimSuffix(string(passwordBytes[:]), "\n")
|
||||
}
|
||||
|
||||
// Init registry API client.
|
||||
a.client = registry.NewClient(a.config.RegistryURL, a.config.VerifyTLS, a.config.Username, a.config.Password)
|
||||
|
@@ -148,6 +148,9 @@ func (c *Client) Namespaces() []string {
|
||||
for k := range c.repos {
|
||||
namespaces = append(namespaces, k)
|
||||
}
|
||||
if !ItemInSlice("library", namespaces) {
|
||||
namespaces = append(namespaces, "library")
|
||||
}
|
||||
sort.Strings(namespaces)
|
||||
return namespaces
|
||||
}
|
||||
|
@@ -42,3 +42,13 @@ func PrettySize(size float64) string {
|
||||
}
|
||||
return fmt.Sprintf("%.*f %s", 0, size, units[i])
|
||||
}
|
||||
|
||||
// ItemInSlice check if item is an element of slice
|
||||
func ItemInSlice(item string, slice []string) bool {
|
||||
for _, i := range slice {
|
||||
if i == item {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
@@ -45,3 +45,13 @@ func TestPrettySize(t *testing.T) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestItemInSlice(t *testing.T) {
|
||||
a := []string{"abc", "def", "ghi"}
|
||||
convey.Convey("Check whether element is in slice", t, func() {
|
||||
convey.So(ItemInSlice("abc", a), convey.ShouldBeTrue)
|
||||
convey.So(ItemInSlice("ghi", a), convey.ShouldBeTrue)
|
||||
convey.So(ItemInSlice("abc1", a), convey.ShouldBeFalse)
|
||||
convey.So(ItemInSlice("gh", a), convey.ShouldBeFalse)
|
||||
})
|
||||
}
|
||||
|
@@ -39,6 +39,7 @@ func setupRenderer(debug bool, registryHost, basePath string) *Template {
|
||||
view := jet.NewHTMLSet("templates")
|
||||
view.SetDevelopmentMode(debug)
|
||||
|
||||
view.AddGlobal("version", version)
|
||||
view.AddGlobal("basePath", basePath)
|
||||
view.AddGlobal("registryHost", registryHost)
|
||||
view.AddGlobal("pretty_size", func(size interface{}) string {
|
||||
|
@@ -22,8 +22,8 @@
|
||||
{{yield body()}}
|
||||
|
||||
<div style="padding: 10px 0; margin-bottom: 20px">
|
||||
<div style="float: left">
|
||||
© 2017-2018 <a href="https://goquiq.com">Quiq Inc.</a>
|
||||
<div style="text-align: center; color:darkgrey">
|
||||
Docker Registry UI v{{version}} © 2017-2018 <a href="https://goquiq.com">Quiq Inc.</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -6,7 +6,10 @@
|
||||
$('#datatable').DataTable({
|
||||
"pageLength": 10,
|
||||
"order": [[ 4, 'desc' ]],
|
||||
"stateSave": true
|
||||
"stateSave": true,
|
||||
"language": {
|
||||
"emptyTable": "No events."
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@@ -3,10 +3,6 @@
|
||||
{{block head()}}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#datatable').DataTable({
|
||||
"pageLength": 25,
|
||||
"stateSave": true
|
||||
});
|
||||
$('#namespace').on('change', function (e) {
|
||||
window.location = '{{ basePath }}/' + this.value;
|
||||
});
|
||||
@@ -18,6 +14,14 @@
|
||||
namespace = namespace.split('/')[1]
|
||||
}
|
||||
$('#namespace').val(namespace);
|
||||
|
||||
$('#datatable').DataTable({
|
||||
"pageLength": 25,
|
||||
"stateSave": true,
|
||||
"language": {
|
||||
"emptyTable": "No repositories in \"" + namespace + "\" namespace."
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{end}}
|
||||
|
@@ -11,7 +11,10 @@
|
||||
"stateSave": true,
|
||||
columnDefs: [
|
||||
{ type: 'natural', targets: 0 }
|
||||
]
|
||||
],
|
||||
"language": {
|
||||
"emptyTable": "No tags in this repository."
|
||||
}
|
||||
})
|
||||
function populateConfirmation() {
|
||||
$('[data-toggle=confirmation]').confirmation({
|
||||
|
3
version.go
Normal file
3
version.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package main
|
||||
|
||||
const version = "0.7.4"
|
Reference in New Issue
Block a user