forked from mirrors/protonmail-bridge-docker
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
deb9b88e84 | ||
|
|
988de6e93b | ||
| 2f420a0bf9 | |||
|
|
946cd4ea8e | ||
|
|
932bc92e2a | ||
|
|
0ed338435d | ||
|
|
1b9e896e30 | ||
|
|
d9fec14796 | ||
|
|
b6a470849e | ||
|
|
ddb3df2c7c | ||
|
|
58cd2eee1d | ||
|
|
3cbc54a93b | ||
|
|
868b1a48c6 | ||
|
|
0419d36658 | ||
|
|
67415bd261 | ||
|
|
d0e4bcd866 | ||
|
|
5a0238e8f4 | ||
|
|
1dff35b541 | ||
|
|
7790563b9f | ||
|
|
7c0d8737dc | ||
|
|
50ac4c2e44 | ||
|
|
b1b6706030 | ||
|
|
b0eeddd83d | ||
|
|
a264602469 | ||
|
|
6a492a15e7 | ||
|
|
bb34034cbb | ||
|
|
109da843e7 | ||
|
|
b5938721aa | ||
|
|
dc8590849b | ||
|
|
8c80cf2d03 | ||
|
|
e6319a0dda | ||
|
|
da1b515c2f | ||
|
|
18626db87f |
57
.drone.yml
Normal file
57
.drone.yml
Normal 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
|
||||||
176
.github/workflows/build.yaml
vendored
176
.github/workflows/build.yaml
vendored
@@ -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' }}
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
3.0.9
|
3.4.0
|
||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.3.0-1
|
3.3.2-1
|
||||||
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal 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
|
||||||
Reference in New Issue
Block a user