mirror of
https://github.com/zoriya/flood.git
synced 2026-06-01 18:47:44 +00:00
dist/containers: publish distroless flood and rtorrent-flood images
This commit is contained in:
@@ -198,3 +198,52 @@ jobs:
|
||||
with:
|
||||
name: flood-win-arm64.exe
|
||||
path: dist-pkg/flood-win-arm64.exe
|
||||
|
||||
docker-distroless:
|
||||
needs: pkg
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: flood-linux-arm64
|
||||
path: dist-pkg
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: flood-linux-x64
|
||||
path: dist-pkg
|
||||
|
||||
- name: Publish flood:master-distroless to Docker Hub
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./distribution/containers/Dockerfile.distroless
|
||||
target: flood
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: jesec/flood:master-distroless
|
||||
|
||||
- name: Publish rtorrent-flood:master-distroless to Docker Hub
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./distribution/containers/Dockerfile.distroless
|
||||
target: rtorrent-flood
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: jesec/rtorrent-flood:master-distroless
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
FROM jesec/busybox-applets as busybox
|
||||
|
||||
FROM alpine as build
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
# Install Flood and dependencies to /bin
|
||||
RUN mkdir -p /root/sysroot/bin
|
||||
COPY dist-pkg dist-pkg
|
||||
RUN if [[ `uname -m` == "aarch64" ]]; \
|
||||
then mv dist-pkg/flood-linux-arm64 flood; \
|
||||
elif [[ `uname -m` == "x86_64" ]]; \
|
||||
then mv dist-pkg/flood-linux-x64 flood; \
|
||||
fi
|
||||
RUN mv flood /root/sysroot/bin/flood
|
||||
COPY --from=busybox /bin/busybox_DF /root/sysroot/bin/df
|
||||
RUN chmod 0555 /root/sysroot/bin/*
|
||||
|
||||
# Create 1001:1001 user
|
||||
RUN mkdir -p /root/sysroot/home/download
|
||||
RUN chown 1001:1001 /root/sysroot/home/download
|
||||
|
||||
# flood image
|
||||
FROM scratch as flood
|
||||
|
||||
COPY --from=build /root/sysroot /
|
||||
|
||||
# Run as 1001:1001 user
|
||||
ENV HOME=/home/download
|
||||
USER 1001:1001
|
||||
|
||||
# Expose port 3000
|
||||
EXPOSE 3000
|
||||
|
||||
# Flood
|
||||
ENTRYPOINT ["flood", "--host=0.0.0.0"]
|
||||
|
||||
# rtorrent-flood image
|
||||
FROM jesec/rtorrent:master as rtorrent
|
||||
FROM flood as rtorrent-flood
|
||||
|
||||
# Install rTorrent
|
||||
COPY --from=rtorrent / /
|
||||
|
||||
# Flood with managed rTorrent daemon
|
||||
ENTRYPOINT ["flood", "--host=0.0.0.0", "--rtorrent"]
|
||||
Reference in New Issue
Block a user