mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-11-21 15:59:32 +03:00
add support for multiarch builds
This commit is contained in:
parent
a1a69f0fa9
commit
63ea699d18
18
Dockerfile
18
Dockerfile
@ -1,18 +1,22 @@
|
||||
FROM debian:12-slim AS downloader
|
||||
FROM --platform=$BUILDPLATFORM alpine AS downloader_start
|
||||
ARG VERSION
|
||||
|
||||
ARG TARGETARCH
|
||||
WORKDIR /tmp/download
|
||||
RUN apk update && apk add unzip wget --no-cache
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install unzip -y
|
||||
|
||||
FROM downloader_start AS downloader_amd64
|
||||
ADD "https://github.com/kinode-dao/kinode/releases/download/${VERSION}/kinode-x86_64-unknown-linux-gnu.zip" kinode-x86_64-unknown-linux-gnu.zip
|
||||
RUN unzip kinode-x86_64-unknown-linux-gnu.zip
|
||||
|
||||
FROM downloader_start AS downloader_arm64
|
||||
ADD "https://github.com/kinode-dao/kinode/releases/download/${VERSION}/kinode-aarch64-unknown-linux-gnu.zip" kinode-aarch64-unknown-linux-gnu.zip
|
||||
RUN unzip kinode-aarch64-unknown-linux-gnu.zip
|
||||
|
||||
FROM downloader_${TARGETARCH} AS downloader
|
||||
|
||||
FROM debian:12-slim
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install openssl -y
|
||||
RUN apt-get update && apt-get install openssl -y
|
||||
|
||||
COPY --from=downloader /tmp/download/kinode /bin/kinode
|
||||
|
||||
|
@ -150,7 +150,12 @@ To build a local Docker image, run the following command in this project root.
|
||||
|
||||
```bash
|
||||
# The `VERSION` may be replaced with the tag of a GitHub release
|
||||
docker buildx build -t 0xlynett/kinode . --build-arg VERSION=v0.9.1 --platform linux/amd64,linux/arm64
|
||||
|
||||
# Build for your system's architecture
|
||||
docker build . -t 0xlynett/kinode --build-arg VERSION=v0.9.1
|
||||
|
||||
# Build a multiarch image
|
||||
docker buildx build . --platform arm64,amd64 --build-arg VERSION=v0.9.1 -t 0xlynett/kinode
|
||||
```
|
||||
|
||||
For example:
|
||||
|
Loading…
Reference in New Issue
Block a user