Skip to content

Commit abb5a5e

Browse files
committed
docker/kea: stork 1.10.0
1 parent ec40b93 commit abb5a5e

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

kea/Dockerfile

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARG KEA_VERSION=2.3.6-1.rk1.jammy
77

88
###
99

10-
FROM --platform=$BUILDPLATFORM public.ecr.aws/docker/library/rust:1.69-slim-bullseye as build
10+
FROM --platform=$BUILDPLATFORM public.ecr.aws/docker/library/rust:1.69-slim-bullseye as build-healthz
1111
RUN rustup target add aarch64-unknown-linux-gnu
1212
RUN apt-get update \
1313
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
@@ -23,6 +23,29 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
2323

2424
###
2525

26+
FROM --platform=$BUILDPLATFORM $BASE as build-stork
27+
28+
RUN apt-get update \
29+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git rake build-essential wget unzip
30+
31+
WORKDIR /build
32+
RUN git clone --depth=1 https://gitlab.isc.org/isc-projects/stork -b v1.10.0
33+
34+
WORKDIR /build/stork/backend
35+
ENV GOPATH=/build/go
36+
37+
RUN --mount=type=cache,dst=/build/stork/tools \
38+
rake build:agent
39+
40+
ENV GOOS=linux
41+
ENV GOARCH=arm64
42+
ENV CGO_ENABLED=0
43+
44+
RUN --mount=type=cache,dst=/build/stork/tools \
45+
../tools/golang/go/bin/go install ./cmd/stork-agent
46+
47+
###
48+
2649
FROM --platform=$BUILDPLATFORM $BASE as config
2750
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y jsonnet
2851
WORKDIR /app
@@ -42,15 +65,13 @@ ARG KEA_VERSION
4265

4366
WORKDIR /download
4467
RUN curl -SsfL --remote-name-all \
45-
https://github.com/hanazuki/isc-kea.deb/releases/download/debian%2F2.3.6-1_rk1_jammy/{kea-admin_${KEA_VERSION}_arm64.deb,kea-common_${KEA_VERSION}_arm64.deb,kea-ctrl-agent_${KEA_VERSION}_arm64.deb,kea-dhcp4-server_${KEA_VERSION}_arm64.deb} \
46-
https://sorah-pkg.s3.dualstack.ap-northeast-1.amazonaws.com/misc/isc-stork-agent_1.5.0.220824140136_arm64.deb
68+
https://github.com/hanazuki/isc-kea.deb/releases/download/debian%2F2.3.6-1_rk1_jammy/{kea-admin_${KEA_VERSION}_arm64.deb,kea-common_${KEA_VERSION}_arm64.deb,kea-ctrl-agent_${KEA_VERSION}_arm64.deb,kea-dhcp4-server_${KEA_VERSION}_arm64.deb}
4769

4870
RUN sha384sum -c --strict <<EOF
4971
3da15d37c3edbaf670400c4221a7d116ebc306c4c573d3f3a6b8ace2ec1fb3782194b118c37a803b6696aa0340f45b17 kea-admin_2.3.6-1.rk1.jammy_arm64.deb
5072
8d4fadc507ce3a98199dceefd71f2da689cab40aa97753bdfb0f2facff0f5c734b968d86809c666dea5f01ec35eb04ac kea-common_2.3.6-1.rk1.jammy_arm64.deb
5173
a735a6e6102defd5fadb20900fb92bbd769368c5c211be3f0f0e9ccab29d2d6e69ad65dd46fed22a016ed0b5a2e74c90 kea-ctrl-agent_2.3.6-1.rk1.jammy_arm64.deb
5274
525e1ba2c96929ce32385d4c240a43ce7c4daf96023810d167b9204ba680517e8557896d40ab1d387de996fce7a84e68 kea-dhcp4-server_2.3.6-1.rk1.jammy_arm64.deb
53-
1e8b67f2afe4404ea3091cbef14e93a23186633a3d571f9cb141d162350d2fe6235d7679e89bed5c2235433f203d706d isc-stork-agent_1.5.0.220824140136_arm64.deb
5475
EOF
5576

5677
###
@@ -72,7 +93,8 @@ RUN --mount=type=bind,from=download,src=/download,dst=/download \
7293
/download/*.deb \
7394
&& apt-get clean && rm -rf /var/lib/apt/lists/*
7495

75-
COPY --from=build /app/bin/healthz /app/healthzd
96+
COPY --from=build-healthz /app/bin/healthz /app/healthzd
97+
COPY --from=build-stork /build/go/bin/linux_arm64/stork-agent /app/stork-agent
7698
COPY run.sh /app/run.sh
7799
COPY choose_dhcp_server_id.rb /app/choose_dhcp_server_id.rb
78100
COPY --from=config /app/kea-ctrl-agent.json /app/kea-ctrl-agent.json

kea/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ echo "SERVER_ID=${SERVER_ID}"
2727
)
2828

2929
kea-ctrl-agent -c /app/kea-ctrl-agent.json &
30-
stork-agent &
30+
/app/stork-agent &
3131
/app/healthzd &
3232

3333
kea-dhcp4 -c /work/kea-dhcp4.json

0 commit comments

Comments
 (0)