Sync README.md from GitHub to DockerHub after push-manifest

This commit is contained in:
Amir Zarrinkafsh 2019-11-10 05:42:36 +11:00 committed by Clément Michaud
parent 0f248a01e9
commit 51465f8b77
3 changed files with 43 additions and 29 deletions

View File

@ -1,5 +1,5 @@
<p align="center"> <p align="center">
<img src="images/authelia-title.png" width="350" title="Authelia"> <img src="https://github.com/clems4ever/authelia/raw/master/images/authelia-title.png" width="350" title="Authelia">
</p> </p>
[![license](https://img.shields.io/badge/license-Apache%202.0-green.svg)][Apache 2.0] [![license](https://img.shields.io/badge/license-Apache%202.0-green.svg)][Apache 2.0]
@ -18,25 +18,25 @@ It acts as a companion of reverse proxies like [nginx] or [Traefik] by handling
<p align="center"> <p align="center">
<img src="images/authelia.logo.png" height="100"/> <img src="https://github.com/clems4ever/authelia/raw/master/images/authelia.logo.png" height="100"/>
<img src="images/plus.png" height="100"/> <img src="https://github.com/clems4ever/authelia/raw/master/images/plus.png" height="100"/>
<img src="images/nginx.logo.png" height="100"/> <img src="https://github.com/clems4ever/authelia/raw/master/images/nginx.logo.png" height="100"/>
<img src="images/traefik.logo.png" height="100"/> <img src="https://github.com/clems4ever/authelia/raw/master/images/traefik.logo.png" height="100"/>
</p> </p>
**Authelia** can be installed as a standalone service using Docker or NPM **Authelia** can be installed as a standalone service using Docker or NPM
but can also be deployed easily on [Kubernetes] leveraging ingress controllers and ingress configuration. but can also be deployed easily on [Kubernetes] leveraging ingress controllers and ingress configuration.
<p align="center"> <p align="center">
<img src="images/kubernetes.logo.png" height="100"/> <img src="https://github.com/clems4ever/authelia/raw/master/images/kubernetes.logo.png" height="100"/>
<img src="images/docker.logo.png" width="100"> <img src="https://github.com/clems4ever/authelia/raw/master/images/docker.logo.png" width="100">
</p> </p>
Here is what Authelia's portal looks like Here is what Authelia's portal looks like
<p align="center"> <p align="center">
<img src="images/first_factor.png" width="400" /> <img src="https://github.com/clems4ever/authelia/raw/master/images/first_factor.png" width="400" />
<img src="images/use-another-method.png" width="400" /> <img src="https://github.com/clems4ever/authelia/raw/master/images/use-another-method.png" width="400" />
</p> </p>
## Features summary ## Features summary
@ -44,9 +44,9 @@ Here is what Authelia's portal looks like
Here is the list of the main available features: Here is the list of the main available features:
* Several kind of second factor: * Several kind of second factor:
* **[Security Key (U2F)](./docs/2factor/security-key.md)** with [Yubikey]. * **[Security Key (U2F)](https://github.com/clems4ever/authelia/blob/master/docs/2factor/security-key.md)** with [Yubikey].
* **[Time-based One-Time password](./docs/2factor/time-based-one-time-password.md)** with [Google Authenticator]. * **[Time-based One-Time password](https://github.com/clems4ever/authelia/blob/master/docs/2factor/time-based-one-time-password.md)** with [Google Authenticator].
* **[Mobile Push Notifications](./docs/2factor/duo-push-notifications.md)** with [Duo](https://duo.com/). * **[Mobile Push Notifications](https://github.com/clems4ever/authelia/blob/master/docs/2factor/duo-push-notifications.md)** with [Duo](https://duo.com/).
* Password reset with identity verification using email confirmation. * Password reset with identity verification using email confirmation.
* Single-factor only authentication method available. * Single-factor only authentication method available.
* Access restriction after too many authentication attempts. * Access restriction after too many authentication attempts.
@ -55,7 +55,7 @@ Here is the list of the main available features:
* Highly-available using distributed database and KV store. * Highly-available using distributed database and KV store.
* Compatible with Kubernetes [ingress-nginx](https://github.com/kubernetes/ingress-nginx) controller out of the box. * Compatible with Kubernetes [ingress-nginx](https://github.com/kubernetes/ingress-nginx) controller out of the box.
For more details about the features, follow [Features](./docs/features.md). For more details about the features, follow [Features](https://github.com/clems4ever/authelia/blob/master/docs/features.md).
## Proxy support ## Proxy support
@ -64,9 +64,9 @@ Authelia works in combination with [nginx] or [Traefik] and soon with [HAProxy]
Docker or directly in [Kubernetes]. Docker or directly in [Kubernetes].
<p align="center"> <p align="center">
<img src="images/nginx.logo.png" height="50"/> <img src="https://github.com/clems4ever/authelia/raw/master/images/nginx.logo.png" height="50"/>
<img src="images/traefik.logo.png" height="50"/> <img src="https://github.com/clems4ever/authelia/raw/master/images/traefik.logo.png" height="50"/>
<img src="images/kubernetes.logo.png" height="50"/> <img src="https://github.com/clems4ever/authelia/raw/master/images/kubernetes.logo.png" height="50"/>
</p> </p>
## Getting Started ## Getting Started
@ -76,12 +76,12 @@ You can start off with
git clone https://github.com/clems4ever/authelia.git && cd authelia git clone https://github.com/clems4ever/authelia.git && cd authelia
source bootstrap.sh source bootstrap.sh
If you want to go further, please read [Getting Started](./docs/getting-started.md). If you want to go further, please read [Getting Started](https://github.com/clems4ever/authelia/blob/master/docs/getting-started.md).
## Deployment ## Deployment
Now that you have tested **Authelia** and you want to try it out in your own infrastructure, Now that you have tested **Authelia** and you want to try it out in your own infrastructure,
you can learn how to deploy and use it with [Deployment](./docs/deployment-production.md). you can learn how to deploy and use it with [Deployment](https://github.com/clems4ever/authelia/blob/master/docs/deployment-production.md).
This guide will show you how to deploy it on bare metal as well as on This guide will show you how to deploy it on bare metal as well as on
[Kubernetes](https://kubernetes.io/). [Kubernetes](https://kubernetes.io/).
@ -89,11 +89,11 @@ This guide will show you how to deploy it on bare metal as well as on
If you want more information about the security measures applied by If you want more information about the security measures applied by
**Authelia** and some tips on how to set up **Authelia** in a secure way, **Authelia** and some tips on how to set up **Authelia** in a secure way,
refer to [Security](./docs/security.md). refer to [Security](https://github.com/clems4ever/authelia/blob/master/docs/security.md).
## Changelog & Breaking changes ## Changelog & Breaking changes
See [CHANGELOG.md](CHANGELOG.md) and [BREAKING.md](BREAKING.md). See [CHANGELOG.md](https://github.com/clems4ever/authelia/blob/master/CHANGELOG.md) and [BREAKING.md](https://github.com/clems4ever/authelia/blob/master/BREAKING.md).
## Contribute ## Contribute
@ -102,16 +102,16 @@ documentation, security reviews or whatever, are very welcome to issue
or review pull requests and take part to discussions in or review pull requests and take part to discussions in
[Gitter](https://gitter.im/authelia/general?utm_source=share-link&utm_medium=link&utm_campaign=share-link). [Gitter](https://gitter.im/authelia/general?utm_source=share-link&utm_medium=link&utm_campaign=share-link).
I am very greatful to contributors for their contributions to the project. Don't hesitate be the next! I am very grateful to contributors for their contributions to the project. Don't hesitate be the next!
## Build Authelia ## Build Authelia
If you want to contribute with code, you should follow the documentation explaining how to [build](./docs/build.md) the application. If you want to contribute with code, you should follow the documentation explaining how to [build](https://github.com/clems4ever/authelia/blob/master/docs/build-and-dev.md) the application.
## License ## License
**Authelia** is **licensed** under the **[Apache 2.0]** license. The terms of the license are detailed **Authelia** is **licensed** under the **[Apache 2.0]** license. The terms of the license are detailed
in [LICENSE](LICENSE). in [LICENSE](https://github.com/clems4ever/authelia/blob/master/LICENSE).
[Apache 2.0]: https://www.apache.org/licenses/LICENSE-2.0 [Apache 2.0]: https://www.apache.org/licenses/LICENSE-2.0

View File

@ -131,6 +131,7 @@ func login(docker *Docker) {
func deploy(docker *Docker, tag string) { func deploy(docker *Docker, tag string) {
imageWithTag := DockerImageName + ":" + tag imageWithTag := DockerImageName + ":" + tag
fmt.Println("===================================================") fmt.Println("===================================================")
fmt.Println("Docker image " + imageWithTag + " will be deployed on Dockerhub.") fmt.Println("Docker image " + imageWithTag + " will be deployed on Dockerhub.")
fmt.Println("===================================================") fmt.Println("===================================================")
@ -150,6 +151,7 @@ func deploy(docker *Docker, tag string) {
func deployManifest(docker *Docker, tag string, amd64tag string, arm32v7tag string, arm64v8tag string) { func deployManifest(docker *Docker, tag string, amd64tag string, arm32v7tag string, arm64v8tag string) {
dockerImagePrefix := DockerImageName + ":" dockerImagePrefix := DockerImageName + ":"
fmt.Println("===================================================") fmt.Println("===================================================")
fmt.Println("Docker manifest " + dockerImagePrefix + tag + " will be deployed on Dockerhub.") fmt.Println("Docker manifest " + dockerImagePrefix + tag + " will be deployed on Dockerhub.")
fmt.Println("===================================================") fmt.Println("===================================================")
@ -162,19 +164,26 @@ func deployManifest(docker *Docker, tag string, amd64tag string, arm32v7tag stri
tags := []string{amd64tag, arm32v7tag, arm64v8tag} tags := []string{amd64tag, arm32v7tag, arm64v8tag}
for _, t := range tags { for _, t := range tags {
username := os.Getenv("DOCKER_USERNAME")
password := os.Getenv("DOCKER_PASSWORD")
fmt.Println("===================================================") fmt.Println("===================================================")
fmt.Println("Docker removing tag for " + dockerImagePrefix + t + " on Dockerhub.") fmt.Println("Docker removing tag for " + dockerImagePrefix + t + " on Dockerhub.")
fmt.Println("===================================================") fmt.Println("===================================================")
err = docker.CleanTag(username, password, t) err = docker.CleanTag(t)
if err != nil { if err != nil {
panic(err) panic(err)
} }
} }
fmt.Println("===================================================")
fmt.Println("Docker pushing README.md to Dockerhub.")
fmt.Println("===================================================")
err = docker.PublishReadme()
if err != nil {
panic(err)
}
} }
func publishDockerImage(arch string) { func publishDockerImage(arch string) {

View File

@ -47,6 +47,11 @@ func (d *Docker) Manifest(tag, amd64tag, arm32v7tag, arm64v8tag string) error {
} }
// CleanTag remove a tag from dockerhub. // CleanTag remove a tag from dockerhub.
func (d *Docker) CleanTag(username, password, tag string) error { func (d *Docker) CleanTag(tag string) error {
return CommandWithStdout("curl", "-u", username+":"+password, "-X", "DELETE", "https://cloud.docker.com/v2/repositories/"+DockerImageName+"/tags/"+tag+"/").Run() return CommandWithStdout("curl", "-s", "-o", "/dev/null", "-u", "$DOCKER_USERNAME:$DOCKER_PASSWORD", "-X", "DELETE", "https://cloud.docker.com/v2/repositories/"+DockerImageName+"/tags/"+tag+"/").Run()
}
// PublishReadme push README.md to dockerhub.
func (d *Docker) PublishReadme() error {
return CommandWithStdout("bash", "-c", `jq -n --arg msg "$(<README.md)" '{"registry":"registry-1.docker.io","full_description": $msg }' | curl -s -o /dev/null -u $DOCKER_USERNAME:$DOCKER_PASSWORD -X "PATCH" -H "Content-Type: application/json" -d @- https://cloud.docker.com/v2/repositories/clems4ever/authelia/`).Run()
} }