Rust implementation of OCI Distribution Spec with granular access control

fix: use vfs storage driver for buildah in containerized CI environment

+14 -14
+14 -14
.tangled/workflows/build.yml
··· 29 29 - name: "Build and push container image" 30 30 command: | 31 31 # Create a container from distroless base 32 - container=$(buildah from gcr.io/distroless/cc-debian12:nonroot) 32 + container=$(buildah --storage-driver vfs from gcr.io/distroless/cc-debian12:nonroot) 33 33 34 34 # Copy the binaries 35 - buildah copy $container target/release/grain /app/grain 36 - buildah copy $container target/release/grainctl /app/grainctl 35 + buildah --storage-driver vfs copy $container target/release/grain /app/grain 36 + buildah --storage-driver vfs copy $container target/release/grainctl /app/grainctl 37 37 38 38 # Set configuration 39 - buildah config --workingdir /app $container 40 - buildah config --env RUST_LOG=info $container 41 - buildah config --port 8888 $container 42 - buildah config --cmd '["/app/grain", "--host", "0.0.0.0:8888", "--users-file", "/data/users.json"]' $container 39 + buildah --storage-driver vfs config --workingdir /app $container 40 + buildah --storage-driver vfs config --env RUST_LOG=info $container 41 + buildah --storage-driver vfs config --port 8888 $container 42 + buildah --storage-driver vfs config --cmd '["/app/grain", "--host", "0.0.0.0:8888", "--users-file", "/data/users.json"]' $container 43 43 44 44 # Add labels 45 - buildah config --label "org.opencontainers.image.source=https://tangled.org/@pierrelf.com/grain" $container 46 - buildah config --label "org.opencontainers.image.description=Grain OCI Registry" $container 47 - buildah config --label "org.opencontainers.image.version=${TANGLED_COMMIT_SHA:0:7}" $container 45 + buildah --storage-driver vfs config --label "org.opencontainers.image.source=https://tangled.org/@pierrelf.com/grain" $container 46 + buildah --storage-driver vfs config --label "org.opencontainers.image.description=Grain OCI Registry" $container 47 + buildah --storage-driver vfs config --label "org.opencontainers.image.version=${TANGLED_COMMIT_SHA:0:7}" $container 48 48 49 49 # Commit the container to an image 50 - buildah commit $container grain:latest 50 + buildah --storage-driver vfs commit $container grain:latest 51 51 52 52 # Login and push to Docker Hub 53 - echo "$DOCKER_PASS" | buildah login --username "$DOCKER_USER" --password-stdin docker.io 54 - buildah push grain:latest docker://docker.io/pierrelf/grain:latest 55 - buildah push grain:latest docker://docker.io/pierrelf/grain:${TANGLED_COMMIT_SHA:0:7} 53 + echo "$DOCKER_PASS" | buildah --storage-driver vfs login --username "$DOCKER_USER" --password-stdin docker.io 54 + buildah --storage-driver vfs push grain:latest docker://docker.io/pierrelf/grain:latest 55 + buildah --storage-driver vfs push grain:latest docker://docker.io/pierrelf/grain:${TANGLED_COMMIT_SHA:0:7}