Skip to content

Commit

Permalink
Use single multi-arch Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
midzelis committed Jun 22, 2023
1 parent c5da1c4 commit 83062cd
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 241 deletions.
26 changes: 23 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
FROM ubuntu:22.04

FROM ubuntu:22.04 as base-amd64
ARG S6_OVERLAY_VERSION=v3.1.5.0
ARG S6_OVERLAY_ARCH=x86_64
ARG PLEX_BUILD=linux-x86_64
ARG PLEX_DISTRO=debian
ARG DEBIAN_FRONTEND="noninteractive"
ARG INTEL_NEO_VERSION=20.48.18558
ARG INTEL_IGC_VERSION=1.0.5699
ARG INTEL_GMMLIB_VERSION=20.3.2

FROM arm64v8/ubuntu:22.04 as base-arm64
ARG S6_OVERLAY_VERSION=v3.1.5.0
ARG S6_OVERLAY_ARCH=aarch64
ARG PLEX_BUILD=linux-aarch64

FROM arm32v7/ubuntu:22.04 as base-arm
ARG S6_OVERLAY_VERSION=v3.1.5.0
ARG S6_OVERLAY_ARCH=arm
ARG PLEX_BUILD=linux-armv7hf_neon

FROM i386/ubuntu:18.04 as base-386
ARG S6_OVERLAY_VERSION=v3.1.5.0
ARG S6_OVERLAY_ARCH=i686
ARG PLEX_BUILD=linux-x86

FROM base-${TARGETARCH} AS plex
ARG TARGETARCH
RUN echo Building pms-docker for ${TARGETARCH}

ARG DEBIAN_FRONTEND="noninteractive"
ARG PLEX_DISTRO=debian

RUN \
# Update and get dependencies
apt-get update && \
Expand Down
78 changes: 0 additions & 78 deletions Dockerfile.arm64

This file was deleted.

78 changes: 0 additions & 78 deletions Dockerfile.armv7

This file was deleted.

78 changes: 0 additions & 78 deletions Dockerfile.i386

This file was deleted.

2 changes: 1 addition & 1 deletion dev/build.386.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ IFS=$'\n\t'

# This is just a helper script to quickly test local Dockerfile builds, please run setup-build-env.sh once

docker buildx build -o type=docker,name=pms-386 --load --platform linux/386 --build-arg AUTOUPDATE=TRUE -f ../Dockerfile.i386 ..
docker buildx build --progress=plain -o type=docker,name=pms-386 --load --platform linux/386 --build-arg AUTOUPDATE=TRUE -f ../Dockerfile ..
2 changes: 1 addition & 1 deletion dev/build.amd64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ IFS=$'\n\t'
# This is just a helper script to quickly test local Dockerfile builds, please run setup-build-env.sh once

# https://github.com/tianon/docker-brew-ubuntu-core/issues/183 explains why need to use --security-opt seccomp:unconfined
docker buildx build --security-opt seccomp:unconfined -o type=docker,name=pms-amd64 --platform linux/amd64 --build-arg AUTOUPDATE=TRUE -f ../Dockerfile ..
docker buildx build --progress=plain --security-opt seccomp:unconfined -o type=docker,name=pms-amd64 --platform linux/amd64 --build-arg AUTOUPDATE=TRUE -f ../Dockerfile ..
2 changes: 1 addition & 1 deletion dev/build.arm32v7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ IFS=$'\n\t'
# This is just a helper script to quickly test local Dockerfile builds, please run setup-build-env.sh once

# https://github.com/tianon/docker-brew-ubuntu-core/issues/183 explains why need to use --security-opt seccomp:unconfined
docker buildx build --security-opt seccomp:unconfined -o type=docker,name=pms-armv7 --load --platform linux/arm/v7 --build-arg AUTOUPDATE=TRUE -f ../Dockerfile.armv7 ..
docker buildx build --progress=plain --security-opt seccomp:unconfined -o type=docker,name=pms-armv7 --load --platform linux/arm/v7 --build-arg AUTOUPDATE=TRUE -f ../Dockerfile ..
2 changes: 1 addition & 1 deletion dev/build.arm64v8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ IFS=$'\n\t'
# This is just a helper script to quickly test local Dockerfile builds, please run setup-build-env.sh once

# https://github.com/tianon/docker-brew-ubuntu-core/issues/183
docker buildx build --security-opt seccomp:unconfined -o type=docker,name=pms-arm64 --load --platform linux/arm64 --build-arg AUTOUPDATE=TRUE -f ../Dockerfile.arm64 ..
docker buildx build --progress=plain --security-opt seccomp:unconfined -o type=docker,name=pms-arm64 --load --platform linux/arm64 --build-arg AUTOUPDATE=TRUE -f ../Dockerfile ..
1 change: 1 addition & 0 deletions dev/push.all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker buildx build --progress=plain --push --security-opt seccomp:unconfined --platform linux/amd64,linux/386,linux/arm/v7,linux/arm64 --build-arg AUTOUPDATE=TRUE -f ../Dockerfile --tag INSERT_TAG_HERE:autoupdate ..

0 comments on commit 83062cd

Please sign in to comment.