Skip to content

Commit f4b2111

Browse files
Add arm dockerfile (#718)
* add arm dockerfile * readme * fix failing gh action
1 parent 3e11db1 commit f4b2111

File tree

5 files changed

+36
-1
lines changed

5 files changed

+36
-1
lines changed

.dockerignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
target
2-
Dockerfile
2+
amd64.Dockerfile
3+
arm64.Dockerfile
34
.dockerignore
45
.git
56
.gitignore

.github/workflows/container.yml

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
- name: Build and push Docker image (${{ matrix.platform }})
4747
uses: docker/build-push-action@v2
4848
with:
49+
file: amd64.Dockerfile
4950
builder: ${{ steps.buildx.outputs.name }}
5051
push: true
5152
platforms: ${{ matrix.platform }}

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,23 @@ Logs about lading's operation can be controlled using the standard `RUST_LOG`
102102
environment variable. eg `RUST_LOG=debug ./lading` will emit logs at `debug`
103103
and above (ie, `info`, `warn`, `error`).
104104

105+
## How to get a build (besides building from source)
106+
107+
### Binary Releases
108+
https://github.com/DataDog/lading/releases
109+
110+
### Docker
111+
112+
For arm (replace platform if needed):
113+
```
114+
docker build -f arm64.Dockerfile . --tag [TAG NAME] --platform linux/arm64
115+
```
116+
117+
For x86_64:
118+
```
119+
docker build -f amd64.Dockerfile . --tag [TAG NAME] --platform linux/amd64
120+
```
121+
105122
## Contributing
106123

107124
See [Contributing][contributing].

Dockerfile amd64.Dockerfile

File renamed without changes.

arm64.Dockerfile

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM docker.io/rust:1.71.0-bullseye@sha256:4ca63d7dc4792e2069e3d302fdf6b48de5ca8016c7abbe50f14466d769117a83 as builder
2+
3+
RUN apt-get update && apt-get install -y \
4+
protobuf-compiler \
5+
&& rm -rf /var/lib/apt/lists/*
6+
7+
WORKDIR /app
8+
COPY . /app
9+
RUN cargo build --release --locked
10+
11+
FROM docker.io/debian:bullseye-slim@sha256:490274cda23d9ce2fd599bfe2d31ce68582491bead3b452fa3d27e8997fa9101
12+
COPY --from=builder /app/target/release/lading /usr/bin/lading
13+
14+
# smoke test
15+
RUN ["/usr/bin/lading", "--help"]
16+
ENTRYPOINT ["/usr/bin/lading"]

0 commit comments

Comments
 (0)