From e5ed9736b3232a84dd6e077e80f1563a27474de4 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Thu, 26 Oct 2023 11:22:58 +0200 Subject: [PATCH] update docker build settings, move to new docker hub repository, use stable branch and major version tags --- .github/workflows/docker-publish.yml | 7 ++++--- README.md | 14 +++++++++----- docker-compose.yml | 2 +- hooks/build | 10 ---------- 4 files changed, 14 insertions(+), 19 deletions(-) delete mode 100755 hooks/build diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index f271999..65364c6 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -50,15 +50,16 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: h44z/wg-portal + images: wgportal/wg-portal flavor: | - latest=true + latest=false prefix= suffix= tags: | type=ref,event=branch - type=ref,event=tag type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern=v{{major}} - name: Build and push Docker image uses: docker/build-push-action@v3 diff --git a/README.md b/README.md index 3703459..154fb61 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# WireGuard Portal +# WireGuard Portal (v1) [![Build Status](https://travis-ci.com/h44z/wg-portal.svg?token=q4pSqaqT58Jzpxdx62xk&branch=master)](https://travis-ci.com/h44z/wg-portal) [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT) @@ -6,7 +6,7 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/h44z/wg-portal)](https://goreportcard.com/report/github.com/h44z/wg-portal) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/h44z/wg-portal) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/h44z/wg-portal) -[![Docker Pulls](https://img.shields.io/docker/pulls/h44z/wg-portal.svg)](https://hub.docker.com/r/h44z/wg-portal/) +[![Docker Pulls](https://img.shields.io/docker/pulls/wgportal/wg-portal.svg)](https://hub.docker.com/r/h44z/wg-portal/) A simple, web based configuration portal for [WireGuard](https://wireguard.com). The portal uses the WireGuard [wgctrl](https://github.com/WireGuard/wgctrl-go) library to manage existing VPN @@ -40,16 +40,20 @@ Make sure that your host system has at least one WireGuard interface (for exampl If you did not start up a WireGuard interface yet, take a look at [wg-quick](https://manpages.debian.org/unstable/wireguard-tools/wg-quick.8.en.html) in order to get started. ### Docker -The easiest way to run WireGuard Portal is to use the Docker image provided. +The easiest way to run WireGuard Portal is to use the [Docker image](https://hub.docker.com/r/wgportal/wg-portal) provided. -HINT: the *latest* tag always refers to the master branch and might contain unstable or incompatible code! +Since the project was accepted by the Docker-Sponsored Open Source Program, the image is now available on Docker Hub: +https://hub.docker.com/r/wgportal/wg-portal + +> :warning: **HINT**: the *latest* tag always refers to the master branch and might contain unstable or incompatible code! +> For production use a fixed version or use the *stable* tag. Docker Compose snippet with some sample configuration values: ``` version: '3.6' services: wg-portal: - image: h44z/wg-portal:latest + image: wgportal/wg-portal:v1 container_name: wg-portal restart: unless-stopped cap_add: diff --git a/docker-compose.yml b/docker-compose.yml index 25e1ffa..0759145 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.6' services: wg-portal: - image: h44z/wg-portal:1.0.17 + image: wgportal/wg-portal:v1 container_name: wg-portal restart: unless-stopped logging: diff --git a/hooks/build b/hooks/build deleted file mode 100755 index 622fc06..0000000 --- a/hooks/build +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -# File needs to be called /hooks/build relative to the Dockerfile. -# Some environment variables are injected into the build hook, see: https://docs.docker.com/docker-hub/builds/advanced/. - -GIT_SHORT_HASH=$(echo $SOURCE_COMMIT | cut -c1-7) -echo "Build hook running for git hash $GIT_SHORT_HASH" -docker build --build-arg BUILD_IDENTIFIER=$DOCKER_TAG \ - --build-arg BUILD_VERSION=$GIT_SHORT_HASH \ - -t $IMAGE_NAME . \ No newline at end of file