33 Commits
dev ... master

Author SHA1 Message Date
Julien Valverdé
deb9b88e84 Removed 0.0.0.0 bind patch
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-10 03:47:00 +02:00
Julien Valverdé
988de6e93b Fixed CI event triggers
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-08 02:18:00 +02:00
2f420a0bf9 CI: automatic builds (#1)
All checks were successful
continuous-integration/drone/push Build is passing
Adds CI pipelines to build and push the project to the Gitea Docker repository.

Co-authored-by: Julien Valverdé <julien.valverde@mailo.com>
Reviewed-on: https://git.jvalver.de/Thilawyn/protonmail-bridge-docker/pulls/1
2023-08-08 01:47:06 +02:00
Julien Valverdé
946cd4ea8e Remove the localhost restriction 2023-08-07 19:24:46 +02:00
GitHub Actions
932bc92e2a Bump build version to 3.4.0 2023-08-05 00:13:04 +00:00
GitHub Actions
0ed338435d Bump build version to 3.3.2 2023-07-14 00:15:56 +00:00
GitHub Actions
1b9e896e30 Bump deb version to 3.3.2-1 2023-07-14 00:15:56 +00:00
GitHub Actions
d9fec14796 Bump build version to 3.3.1 2023-07-08 00:16:29 +00:00
GitHub Actions
b6a470849e Bump deb version to 3.3.0-1 2023-06-22 00:14:57 +00:00
GitHub Actions
ddb3df2c7c Bump build version to 3.3.0 2023-06-09 00:17:58 +00:00
GitHub Actions
58cd2eee1d Bump deb version to 3.2.0-1 2023-05-27 00:13:19 +00:00
GitHub Actions
3cbc54a93b Bump build version to 3.2.0 2023-05-16 00:12:45 +00:00
GitHub Actions
868b1a48c6 Bump build version to 3.1.3 2023-05-11 00:12:36 +00:00
GitHub Actions
0419d36658 Bump deb version to 3.1.3-1 2023-05-11 00:12:35 +00:00
Daniel Nathan Gray
67415bd261 Add a docker compose file (#70)
It's quite the norm to include a docker-compose file, generally in the
README or the root for people to copy and modify. For example as
https://github.com/wfg/docker-openvpn-client has done so.

If there are [Environmental
variables](https://github.com/wfg/docker-openvpn-client#environment-variables),
they should also be documented - in this case there isn't.
2023-05-02 14:26:43 +08:00
GitHub Actions
d0e4bcd866 Bump build version to 3.1.2 2023-04-28 00:13:24 +00:00
GitHub Actions
5a0238e8f4 Bump deb version to 3.1.2-1 2023-04-28 00:13:23 +00:00
GitHub Actions
1dff35b541 Bump build version to 3.1.1 2023-04-12 00:12:15 +00:00
GitHub Actions
7790563b9f Bump build version to 3.1.0 2023-04-06 00:12:09 +00:00
GitHub Actions
7c0d8737dc Bump build version to 3.0.21 2023-03-24 00:13:03 +00:00
GitHub Actions
50ac4c2e44 Bump deb version to 3.0.21-1 2023-03-24 00:13:02 +00:00
Aziz Hasanain
b1b6706030 Update Ubuntu tag for deb to fix GLIBC dependency (#80)
GLIBC dependency issue highlighted in
https://github.com/shenxn/protonmail-bridge-docker/issues/79 is caused
by v3 of the bridge not supporting bionic. This PR simply updates the
"deb" version to match the "build" version which is already on
ubuntu:jammy.
2023-03-23 09:13:58 +08:00
GitHub Actions
b0eeddd83d Bump build version to 3.0.20 2023-03-11 00:12:48 +00:00
GitHub Actions
a264602469 Bump deb version to 3.0.20-1 2023-03-11 00:12:47 +00:00
GitHub Actions
6a492a15e7 Bump build version to 3.0.19 2023-03-02 00:15:24 +00:00
GitHub Actions
bb34034cbb Bump deb version to 3.0.19-1 2023-03-02 00:15:23 +00:00
GitHub Actions
109da843e7 Bump build version to 3.0.18 2023-02-25 00:14:35 +00:00
GitHub Actions
b5938721aa Bump deb version to 3.0.17-1 2023-02-23 00:15:10 +00:00
GitHub Actions
dc8590849b Bump build version to 3.0.16 2023-02-18 00:14:05 +00:00
GitHub Actions
8c80cf2d03 Bump build version to 3.0.15 2023-02-15 00:14:54 +00:00
GitHub Actions
e6319a0dda Bump build version to 3.0.14 2023-02-10 00:14:30 +00:00
GitHub Actions
da1b515c2f Bump build version to 3.0.12 2023-02-02 00:13:53 +00:00
GitHub Actions
18626db87f Bump build version to 3.0.10 2023-01-18 00:13:48 +00:00
8 changed files with 144 additions and 127 deletions

57
.drone.yml Normal file
View File

@@ -0,0 +1,57 @@
kind: pipeline
type: docker
name: docker-build
steps:
- name: build
image: plugins/docker
settings:
registry: git.jvalver.de
username:
from_secret: username
password:
from_secret: password
repo: git.jvalver.de/thilawyn/protonmail-bridge-docker
dockerfile: build/Dockerfile
dry_run: true
context: build
autotag: true
compress: true
platform: linux/amd64
trigger:
event:
exclude:
- tag
branch:
exclude:
- master
---
kind: pipeline
type: docker
name: docker-build-and-publish
steps:
- name: build-and-publish
image: plugins/docker
settings:
registry: git.jvalver.de
username:
from_secret: username
password:
from_secret: password
repo: git.jvalver.de/thilawyn/protonmail-bridge-docker
dockerfile: build/Dockerfile
context: build
autotag: true
compress: true
platform: linux/amd64
trigger:
event:
exclude:
- pull_request
branch:
- master

View File

@@ -19,120 +19,74 @@ env:
PLATFORMS: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/riscv64 PLATFORMS: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/riscv64
jobs: jobs:
build-binary: build:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
strategy: services:
matrix: registry:
arch: ["amd64", "arm64", "arm", "riscv64"] image: registry:2
fail-fast: true ports:
- 5000:5000
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@master
with:
path: main
- name: Set version - name: Set version
id: version id: version
run: echo "version=`cat main/build/VERSION`" >> $GITHUB_OUTPUT run: echo "::set-output name=version::`cat build/VERSION`"
- name: Checkout proton bridge repo - name: Set repo
uses: actions/checkout@v3 id: repo
run: if [[ $GITHUB_REF == "refs/heads/master" ]]; then echo "::set-output name=repo::${DOCKER_REPO}"; else echo "::set-output name=repo::${DOCKER_REPO_DEV}"; fi
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with: with:
repository: ProtonMail/proton-bridge images: ${{ steps.repo.outputs.repo }}
ref: v${{ steps.version.outputs.version }} - name: Set up QEMU
path: proton-bridge uses: docker/setup-qemu-action@v1
- name: Set up golang - name: Set up Docker Buildx
uses: actions/setup-go@v3 uses: docker/setup-buildx-action@v1
with: with:
go-version: 1.18 driver-opts: network=host
check-latest: true - name: Build image without push to registry
- name: Install dependencies uses: docker/build-push-action@v2
run: sudo apt-get install -y --no-install-recommends build-essential libsecret-1-dev with:
- name: Download go dep context: ./build
if: ${{ matrix.arch == 'arm' }} file: ./build/Dockerfile
working-directory: proton-bridge platforms: ${{ env.PLATFORMS }}
# Build once to download deps. push: true
# This step is expected to fail. tags: localhost:5000/protonmail-bridge:latest
run: make build-nogui || true - name: Scan image
env: id: scan
GOARCH: ${{ matrix.arch }} uses: anchore/scan-action@v2
- name: Patch for 32 bit arch with:
if: ${{ matrix.arch == 'arm' }} image: localhost:5000/protonmail-bridge:latest
# For 32bit architectures, there was a overflow error on the parser fail-build: true
# This is a workaround for this problem found at: severity-cutoff: critical
# https://github.com/antlr/antlr4/issues/2433#issuecomment-774514106 acs-report-enable: true
run: find $(go env GOPATH)/pkg/mod/github.com/\!proton\!mail/go-rfc5322*/ -type f -exec sed -i.bak 's/(1<</(int64(1)<</g' {} + - name: Upload Anchore scan SARIF report
- name: Build binary uses: github/codeql-action/upload-sarif@v1
working-directory: proton-bridge with:
run: make build-nogui sarif_file: ${{ steps.scan.outputs.sarif }}
env: - name: Login to DockerHub
GOARCH: ${{ matrix.arch }} uses: docker/login-action@v1
# build: if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
# runs-on: ubuntu-latest with:
# services: username: ${{ secrets.REGISTRY_USERNAME }}
# registry: password: ${{ secrets.REGISTRY_PASSWORD }}
# image: registry:2 - name: Login to GitHub Container Registry
# ports: uses: docker/login-action@v1
# - 5000:5000 if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/dev' }}
# steps: with:
# - name: Checkout registry: ghcr.io
# uses: actions/checkout@master username: ${{ github.repository_owner }}
# - name: Set version password: ${{ secrets.CR_PAT }}
# id: version - name: Push image
# run: echo "::set-output name=version::`cat build/VERSION`" uses: docker/build-push-action@v2
# - name: Set repo with:
# id: repo context: ./build
# run: if [[ $GITHUB_REF == "refs/heads/master" ]]; then echo "::set-output name=repo::${DOCKER_REPO}"; else echo "::set-output name=repo::${DOCKER_REPO_DEV}"; fi file: ./build/Dockerfile
# - name: Docker meta platforms: ${{ env.PLATFORMS }}
# id: docker_meta tags: |
# uses: crazy-max/ghaction-docker-meta@v1 ${{ steps.repo.outputs.repo }}:build
# with: ${{ steps.repo.outputs.repo }}:${{ steps.version.outputs.version }}-build
# images: ${{ steps.repo.outputs.repo }} labels: ${{ steps.docker_meta.outputs.labels }}
# - name: Set up QEMU push: ${{ github.event_name != 'pull_request' }}
# uses: docker/setup-qemu-action@v1
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# with:
# driver-opts: network=host
# - name: Build image without push to registry
# uses: docker/build-push-action@v2
# with:
# context: ./build
# file: ./build/Dockerfile
# platforms: ${{ env.PLATFORMS }}
# push: true
# tags: localhost:5000/protonmail-bridge:latest
# - name: Scan image
# id: scan
# uses: anchore/scan-action@v2
# with:
# image: localhost:5000/protonmail-bridge:latest
# fail-build: true
# severity-cutoff: critical
# acs-report-enable: true
# - name: Upload Anchore scan SARIF report
# uses: github/codeql-action/upload-sarif@v1
# with:
# sarif_file: ${{ steps.scan.outputs.sarif }}
# - name: Login to DockerHub
# uses: docker/login-action@v1
# if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
# with:
# username: ${{ secrets.REGISTRY_USERNAME }}
# password: ${{ secrets.REGISTRY_PASSWORD }}
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v1
# if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/dev' }}
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.CR_PAT }}
# - name: Push image
# uses: docker/build-push-action@v2
# with:
# context: ./build
# file: ./build/Dockerfile
# platforms: ${{ env.PLATFORMS }}
# tags: |
# ${{ steps.repo.outputs.repo }}:build
# ${{ steps.repo.outputs.repo }}:${{ steps.version.outputs.version }}-build
# labels: ${{ steps.docker_meta.outputs.labels }}
# push: ${{ github.event_name != 'pull_request' }}

View File

@@ -1,5 +1,4 @@
# Use carlosedp/golang for riscv64 support FROM golang:1.20-bookworm AS build
FROM carlosedp/golang:1.18 AS build
# Install dependencies # Install dependencies
RUN apt-get update && apt-get install -y git build-essential libsecret-1-dev RUN apt-get update && apt-get install -y git build-essential libsecret-1-dev

View File

@@ -1 +1 @@
3.0.9 3.4.0

View File

@@ -1,11 +0,0 @@
#!/bin/bash
set -ex
GOLANG_VERSION=1.18.7
ARCH=$(uname -m)
if [[ $ARCH == "riscv64" ]]; then
# There is no official riscv64 release. Use carlosedp/riscv-bringup instead.
wget

View File

@@ -1,4 +1,4 @@
FROM ubuntu:bionic FROM ubuntu:jammy
LABEL maintainer="Xiaonan Shen <s@sxn.dev>" LABEL maintainer="Xiaonan Shen <s@sxn.dev>"
EXPOSE 25/tcp EXPOSE 25/tcp

View File

@@ -1 +1 @@
2.3.0-1 3.3.2-1

18
docker-compose.yml Normal file
View File

@@ -0,0 +1,18 @@
version: '2.1'
services:
protonmail-bridge:
image: shenxn/protonmail-bridge
# build:
# context: ./build
# dockerfile: Dockerfile
container_name: pm_bridge
ports:
- 1025:25/tcp
- 1143:143/tcp
restart: unless-stopped
stdin_open: true
tty: true
volumes:
protonmail:
name: protonmail