chore(lander): fix Docker build

This commit is contained in:
Jef Roosens 2023-11-14 15:34:07 +01:00
parent 6af3e6ad6d
commit 29f4edc059
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
4 changed files with 29 additions and 19 deletions

View file

@ -1,11 +1,12 @@
FROM alpine:3.18.0 AS builder
FROM ubuntu:23.10 AS builder
ARG DI_VER=1.2.5
RUN apk add --update --no-cache \
build-base \
make \
curl
RUN apt update && \
apt install -y --no-install-recommends \
curl ca-certificates \
build-essential \
musl musl-dev musl-tools
WORKDIR /app
@ -18,7 +19,7 @@ RUN curl -Lo - "https://github.com/Yelp/dumb-init/archive/refs/tags/v${DI_VER}.t
COPY . ./
RUN make CFLAGS='-O3' LDFLAGS='-static -flto' && \
RUN make CFLAGS='-O3' LDFLAGS='-flto -static' && \
strip build/lander && \
readelf -d build/lander && \
[ "$(readelf -d build/lander | grep NEEDED | wc -l)" = 0 ]