Skip to content
This repository was archived by the owner on Jan 5, 2025. It is now read-only.

Commit 5ab3a4e

Browse files
Merge pull request #11 from sholzmayer/master
support docker image build for arm32 and amd64 architecture
2 parents 238d47b + 1a8585f commit 5ab3a4e

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

Dockerfile.arm32v7

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM ubuntu:xenial
2+
3+
MAINTAINER Simon Holzmayer <[email protected]>
4+
5+
ARG DEBIAN_FRONTEND=noninteractive
6+
7+
RUN apt-get -q -y update \
8+
&& apt-get -q -y -o "DPkg::Options::=--force-confold" -o "DPkg::Options::=--force-confdef" install apt-utils \
9+
&& apt-get -q -y -o "DPkg::Options::=--force-confold" -o "DPkg::Options::=--force-confdef" dist-upgrade \
10+
&& apt-get -q -y -o "DPkg::Options::=--force-confold" -o "DPkg::Options::=--force-confdef" install isc-dhcp-server man \
11+
&& apt-get -q -y autoremove \
12+
&& apt-get -q -y clean \
13+
&& rm -rf /var/lib/apt/lists/*
14+
15+
COPY util/dumb-init_1.2.0_armhf /usr/bin/dumb-init
16+
COPY util/entrypoint.sh /entrypoint.sh
17+
ENTRYPOINT ["/entrypoint.sh"]

build

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
#!/bin/bash
2-
docker build -t networkboot/dhcpd "$@" $(dirname $0)
2+
MACHINE_TYPE=`uname -m`
3+
4+
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
5+
docker build -t networkboot/dhcpd "$@" $(dirname $0)
6+
elif [ ${MACHINE_TYPE} == 'armv7l' ]; then
7+
docker build -t networkboot/dhcpd:arm32v7 "$@" $(dirname $0) -f Dockerfile.arm32v7
8+
else
9+
echo "Your machine type $MACHINE_TYPE is currently not supported" >&2
10+
fi

util/dumb-init_1.2.0_armhf

9.59 KB
Binary file not shown.

0 commit comments

Comments
 (0)