Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and push docker image

on:
workflow_run:
workflows: [ "Build and Release" ]
types: [ completed ]

permissions:
contents: read

env:
image_tag: ${{ github.event.workflow_run.head_branch }}

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
rustfs/rc:${{ env.image_tag }}
rustfs/rc:latest
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM rust:1.92.0-alpine3.23 AS builder

LABEL maintainer="hello@rustfs.com"

WORKDIR /app

COPY . .

RUN cargo build --release

FROM alpine:3.23

COPY --from=builder /app/target/release/rc /usr/bin/rc
COPY --from=builder /app/LICENSE-* /licenses/

ENTRYPOINT ["rc"]
25 changes: 12 additions & 13 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
services:
# RustFS - S3-compatible object storage (Tier 1)
rustfs:
image: rustfs/rustfs:latest
container_name: rc-test-rustfs
image: rustfs/rustfs:1.0.0-alpha.80
container_name: rustfs
ports:
- "9000:9000" # S3 API
- "9001:9001" # Console
environment:
RUSTFS_ROOT_USER: accesskey
RUSTFS_ROOT_PASSWORD: secretkey
RUSTFS_ROOT_USER: rustfsadmin
RUSTFS_ROOT_PASSWORD: rustfsadmin
RUSTFS_VOLUMES: /data
RUSTFS_ADDRESS: ":9000"
RUSTFS_CONSOLE_ENABLE: "true"
RUSTFS_CONSOLE_ADDRESS: ":9001"
volumes:
- rustfs-data:/data
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:9000/minio/health/live"]
test: ["CMD", "curl", "-sf", "http://127.0.0.1:9000/health"]
interval: 10s
timeout: 5s
retries: 5
Expand All @@ -32,18 +32,17 @@ services:

# Initialize RustFS - create test buckets using mc client
rustfs-init:
image: quay.io/minio/mc:latest
container_name: rc-test-rustfs-init
image: rustfs/rc:latest
container_name: rc-init
depends_on:
rustfs:
condition: service_healthy
- rustfs
entrypoint: >
/bin/sh -c "
mc alias set local http://rustfs:9000 accesskey secretkey;
mc mb local/test-bucket --ignore-existing;
mc mb local/another-bucket --ignore-existing;
until (/usr/bin/rc alias set rustfs http://rustfs:9000 rustfsadmin rustfsadmin) do echo '...waiting...' && sleep 1; done;
/usr/bin/rc mb rustfs/test-bucket;
/usr/bin/rc mb rustfs/another-bucket;
echo 'RustFS initialization complete';
exit 0;
tail -f /dev/null
"
networks:
- rc-test-network
Expand Down