File tree 2 files changed +66
-0
lines changed
2 files changed +66
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : docker
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' *'
7
+
8
+ jobs :
9
+ docker :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ -
13
+ name : Checkout
14
+ uses : actions/checkout@v3
15
+ -
16
+ name : Docker meta
17
+ id : meta
18
+ uses : docker/metadata-action@v4
19
+ with :
20
+ images : |
21
+ ghcr.io/royxiang/plexproxy
22
+ tags : |
23
+ type=semver,pattern={{version}}
24
+ -
25
+ name : Set up QEMU
26
+ uses : docker/setup-qemu-action@v2
27
+ -
28
+ name : Set up Docker Buildx
29
+ uses : docker/setup-buildx-action@v2
30
+ -
31
+ name : Login to GitHub Container Registry
32
+ uses : docker/login-action@v2
33
+ with :
34
+ registry : ghcr.io
35
+ username : ${{ github.repository_owner }}
36
+ password : ${{ secrets.GITHUB_TOKEN }}
37
+ -
38
+ name : Build and push
39
+ uses : docker/build-push-action@v3
40
+ with :
41
+ build-args : |
42
+ VERSION=${{ github.ref_name }}
43
+ push : true
44
+ tags : ${{ steps.meta.outputs.tags }}
45
+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change
1
+ FROM golang:1.17 AS builder
2
+
3
+ ARG VERSION
4
+
5
+ ENV CGO_ENABLED=0
6
+
7
+ WORKDIR /go/src/github.com/RoyXiang/plexproxy/
8
+
9
+ COPY . .
10
+
11
+ RUN go install -v -ldflags "-s -w -X 'main.Version=${VERSION}'" -trimpath
12
+
13
+ FROM gcr.io/distroless/base-debian11:nonroot
14
+
15
+ COPY --from=builder --chown=nonroot /go/bin/plexproxy /usr/local/bin/
16
+
17
+ USER nonroot
18
+
19
+ EXPOSE 5000
20
+
21
+ ENTRYPOINT ["/usr/local/bin/plexproxy" ]
You can’t perform that action at this time.
0 commit comments