From fd96ee2840c1e5a6e85f0ff9a7c6a6876840e45f Mon Sep 17 00:00:00 2001 From: sh <37271604+shumvgolove@users.noreply.github.com> Date: Mon, 24 Apr 2023 15:34:26 +0300 Subject: [PATCH] docker: revert buildplatform (#736) * docker: revert buildplatform * docker: only build smp-server --- build.Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.Dockerfile b/build.Dockerfile index 831adc58a..e7db3ef3b 100644 --- a/build.Dockerfile +++ b/build.Dockerfile @@ -1,5 +1,5 @@ -FROM --platform=$BUILDPLATFORM ubuntu:23.04 AS final -FROM --platform=$BUILDPLATFORM ubuntu:23.04 AS build +FROM ubuntu:23.04 AS final +FROM ubuntu:23.04 AS build ### Build stage @@ -21,10 +21,10 @@ WORKDIR /project # Compile smp-server RUN cabal update -RUN cabal install +RUN cabal build exe:smp-server --bindir=/root/ # Strip the binary from debug symbols to reduce size -RUN strip /root/.cabal/bin/smp-server +RUN strip /root/smp-server ### Final stage @@ -34,7 +34,7 @@ FROM final RUN apt-get update && apt-get install -y openssl libnuma-dev # Copy compiled smp-server from build stage -COPY --from=build /root/.cabal/bin/smp-server /usr/bin/smp-server +COPY --from=build /root/smp-server /usr/bin/smp-server # Copy our helper script COPY ./scripts/docker/entrypoint /usr/bin/entrypoint