mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 15:43:21 +00:00
docker multi-arch build
This commit is contained in:
parent
9f8c31b968
commit
b4734e042a
2 changed files with 34 additions and 0 deletions
29
.github/workflows/docker.yml
vendored
Normal file
29
.github/workflows/docker.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
name: Docker build
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
||||
push: true
|
||||
tags: ghcr.io/0xerr0r/rest-server:latest
|
|
@ -11,6 +11,11 @@ RUN go build -o rest-server ./cmd/rest-server
|
|||
|
||||
FROM alpine
|
||||
|
||||
|
||||
LABEL org.opencontainers.image.source="https://github.com/0xERR0R/rest-server" \
|
||||
org.opencontainers.image.url="https://github.com/0xERR0R/rest-server" \
|
||||
org.opencontainers.image.title="Rest Server is a high performance HTTP server that implements restic's REST backend API."
|
||||
|
||||
ENV DATA_DIRECTORY /data
|
||||
ENV PASSWORD_FILE /data/.htpasswd
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue