Skip to content

Commit 3d18a62

Browse files
authored
feat: Docker container (#56)
* feat: Docker container
1 parent cc54674 commit 3d18a62

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
tags:
66
- v*
77

8+
env:
9+
REGISTRY: ghcr.io
10+
811
jobs:
912
release:
1013
runs-on: ubuntu-22.04
@@ -23,6 +26,18 @@ jobs:
2326
with:
2427
generate_release_notes: true
2528
make_latest: true
29+
- name: Log in to the Container registry
30+
uses: docker/login-action@v3
31+
with:
32+
registry: ${{ env.REGISTRY }}
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
- uses: docker/setup-qemu-action@v3
36+
- uses: docker/setup-buildx-action@v3
37+
- uses: docker/build-push-action@v6
38+
with:
39+
push: true
40+
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/sprocket:${{ github.ref_name }}
2641
build_artifacts:
2742
runs-on: ${{ matrix.os }}
2843
strategy:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
* Added a `Dockerfile` and automation to release Docker images with each Sprocket version ([#56](https://github.com/stjude-rust-labs/sprocket/pull/56)).
11+
1012
## 0.10.0 - 01-17-2025
1113

1214
### Added

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM rust:1.82 AS builder
2+
3+
WORKDIR /tmp/sprocket
4+
5+
COPY Cargo.lock Cargo.toml ./
6+
COPY src/ src/
7+
8+
RUN cargo build --release
9+
10+
FROM debian:bookworm
11+
12+
COPY --from=builder /tmp/sprocket/target/release/sprocket /opt/sprocket/bin/sprocket
13+
14+
ENV PATH=/opt/sprocket/bin:$PATH
15+
16+
ENTRYPOINT ["sprocket"]
17+
CMD ["--help"]

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ running the following command.
6464
cargo install sprocket
6565
```
6666

67+
### Docker
68+
69+
Sprocket is available as a Docker [image](https://github.com/stjude-rust-labs/sprocket/pkgs/container/sprocket).
70+
71+
```bash
72+
docker pull ghcr.io/stjude-rust-labs/sprocket:v0.11.0
73+
```
74+
6775
## 🖥️ Development
6876

6977
To bootstrap a development environment, please use the following commands.

0 commit comments

Comments
 (0)