Skip to content

Commit cbe4ebb

Browse files
committed
Rclone v1.57.0 binary; Multistep image with builder; GA multiarch builds
1 parent c6b9d73 commit cbe4ebb

File tree

3 files changed

+69
-1
lines changed

3 files changed

+69
-1
lines changed

.github/workflows/build_images.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
# Multiarch build file credits go to Lars Kellogg-Stedman at blog.oddbit.com. If You ever see this - thanks!
3+
name: 'build images'
4+
5+
on:
6+
push:
7+
branches:
8+
- master
9+
10+
jobs:
11+
docker:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Prepare
18+
id: prep
19+
run: |
20+
DOCKER_IMAGE=${{ secrets.DOCKER_ORG }}/${GITHUB_REPOSITORY#*/}
21+
VERSION=$(cat VERSION)
22+
23+
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest"
24+
25+
# Set output parameters.
26+
echo ::set-output name=tags::${TAGS}
27+
echo ::set-output name=docker_image::${DOCKER_IMAGE}
28+
29+
- name: Set up QEMU
30+
uses: docker/setup-qemu-action@master
31+
with:
32+
platforms: all
33+
34+
- name: Set up Docker Buildx
35+
id: buildx
36+
uses: docker/setup-buildx-action@master
37+
38+
- name: Login to DockerHub
39+
if: github.event_name != 'pull_request'
40+
uses: docker/login-action@v1
41+
with:
42+
username: ${{ secrets.DOCKER_USERNAME }}
43+
password: ${{ secrets.DOCKER_PASSWORD }}
44+
45+
- name: Build
46+
uses: docker/build-push-action@v2
47+
with:
48+
builder: ${{ steps.buildx.outputs.name }}
49+
context: .
50+
file: ./Dockerfile
51+
platforms: linux/amd64,linux/arm64
52+
push: true
53+
tags: ${{ steps.prep.outputs.tags }}

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
####
2+
FROM golang:alpine AS builder
3+
RUN apk update && apk add --no-cache git make bash
4+
WORKDIR $GOPATH/src/csi-rclone-nodeplugin
5+
COPY . .
6+
RUN make plugin
7+
8+
####
9+
FROM alpine:3.9
10+
RUN apk add --no-cache ca-certificates bash fuse curl unzip
11+
12+
RUN curl https://rclone.org/install.sh | bash
13+
14+
COPY --from=builder /go/src/csi-rclone-nodeplugin/_output/csi-rclone-plugin /bin/csi-rclone-plugin
15+
ENTRYPOINT ["/bin/csi-rclone-plugin"]

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.2.8
1+
v1.2.9

0 commit comments

Comments
 (0)