Skip to content

Commit

Permalink
fix generation of Docker images with buildx v0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 committed Feb 13, 2023
1 parent 9e91339 commit efa75a1
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions scripts/dockerhub.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,17 @@ endef
export DOCKERFILE_DOCKERHUB

define DOCKERFILE_DOCKERHUB_RPI_32
FROM --platform=linux/amd64 $(RPI32_IMAGE)
RUN ["cross-build-start"]
FROM $(RPI32_IMAGE) AS base
RUN apt update && apt install -y --no-install-recommends libcamera0
RUN ["cross-build-end"]
ARG BINARY
ADD $$BINARY /
ENTRYPOINT [ "/rtsp-simple-server" ]
endef
export DOCKERFILE_DOCKERHUB_RPI_32

define DOCKERFILE_DOCKERHUB_RPI_64
FROM --platform=linux/amd64 $(RPI64_IMAGE)
RUN ["cross-build-start"]
FROM $(RPI64_IMAGE)
RUN apt update && apt install -y --no-install-recommends libcamera0
RUN ["cross-build-end"]
ARG BINARY
ADD $$BINARY /
ENTRYPOINT [ "/rtsp-simple-server" ]
Expand All @@ -39,48 +35,55 @@ dockerhub:
docker buildx create --name=builder --use

echo "$$DOCKERFILE_DOCKERHUB" | docker buildx build . -f - \
--provenance=false \
--platform=linux/amd64 \
--build-arg BINARY="$$(echo binaries/*linux_amd64.tar.gz)" \
-t aler9/rtsp-simple-server:$(VERSION)-amd64 \
-t aler9/rtsp-simple-server:latest-amd64 \
--push

echo "$$DOCKERFILE_DOCKERHUB" | docker buildx build . -f - \
--provenance=false \
--platform=linux/arm/v6 \
--build-arg BINARY="$$(echo binaries/*linux_armv6.tar.gz)" \
-t aler9/rtsp-simple-server:$(VERSION)-armv6 \
-t aler9/rtsp-simple-server:latest-armv6 \
--push

echo "$$DOCKERFILE_DOCKERHUB_RPI_32" | docker buildx build . -f - \
--provenance=false \
--platform=linux/arm/v6 \
--build-arg BINARY="$$(echo binaries/*linux_armv6.tar.gz)" \
-t aler9/rtsp-simple-server:$(VERSION)-armv6-rpi \
-t aler9/rtsp-simple-server:latest-armv6-rpi \
--push

echo "$$DOCKERFILE_DOCKERHUB" | docker buildx build . -f - \
--provenance=false \
--platform=linux/arm/v7 \
--build-arg BINARY="$$(echo binaries/*linux_armv7.tar.gz)" \
-t aler9/rtsp-simple-server:$(VERSION)-armv7 \
-t aler9/rtsp-simple-server:latest-armv7 \
--push

echo "$$DOCKERFILE_DOCKERHUB_RPI_32" | docker buildx build . -f - \
--provenance=false \
--platform=linux/arm/v7 \
--build-arg BINARY="$$(echo binaries/*linux_armv7.tar.gz)" \
-t aler9/rtsp-simple-server:$(VERSION)-armv7-rpi \
-t aler9/rtsp-simple-server:latest-armv7-rpi \
--push

echo "$$DOCKERFILE_DOCKERHUB" | docker buildx build . -f - \
--provenance=false \
--platform=linux/arm64/v8 \
--build-arg BINARY="$$(echo binaries/*linux_arm64v8.tar.gz)" \
-t aler9/rtsp-simple-server:$(VERSION)-arm64v8 \
-t aler9/rtsp-simple-server:latest-arm64v8 \
--push

echo "$$DOCKERFILE_DOCKERHUB_RPI_64" | docker buildx build . -f - \
--provenance=false \
--platform=linux/arm64/v8 \
--build-arg BINARY="$$(echo binaries/*linux_arm64v8.tar.gz)" \
-t aler9/rtsp-simple-server:$(VERSION)-arm64v8-rpi \
Expand Down

0 comments on commit efa75a1

Please sign in to comment.