From 3d287d6869250178425e548580dadfc74a0045a7 Mon Sep 17 00:00:00 2001 From: Stefano Torresi Date: Mon, 8 Jul 2024 20:31:26 +0200 Subject: [PATCH] use rpm in SLE Dockerfile since we now have the rpm we don't need to build the binary within a container build, we can just zypper install it --- packaging/suse/container/Dockerfile | 35 +++++++++++------------------ 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/packaging/suse/container/Dockerfile b/packaging/suse/container/Dockerfile index adaf3647..9358b536 100644 --- a/packaging/suse/container/Dockerfile +++ b/packaging/suse/container/Dockerfile @@ -5,32 +5,23 @@ #!UseOBSRepositories #!ExclusiveArch: x86_64 -FROM bci/rust:1.66 AS release -ADD wanda.tar.gz premium-checks.tar.gz* /build/ -RUN mv /build/priv/catalog/* /build/wanda/priv/catalog || true && rm -fr /build/priv/ -# Workaround for https://github.com/openSUSE/obs-build/issues/487 -RUN zypper --non-interactive in sles-release -RUN zypper -n in git-core elixir>=1.15 elixir-hex erlang-rebar3 -WORKDIR /build/wanda/ -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 -ENV MIX_ENV=prod -ENV MIX_HOME=/usr/bin -ENV MIX_REBAR3=/usr/bin/rebar3 -ENV MIX_PATH=/usr/lib/elixir/lib/hex/ebin -ENV VERSION=%%VERSION%% -RUN mix phx.digest -RUN mix release +FROM bci/bci-base:15.6 -FROM bci/rust:1.66 AS wanda # Define labels according to https://en.opensuse.org/Building_derived_containers -# labelprefix=com.suse.trento +# labelprefix=com.suse.trento.wanda +LABEL org.opencontainers.image.title="Trento Wanda" +LABEL org.opencontainers.image.description="Container image for Trento Wanda server component" +LABEL org.opencontainers.image.url="https://www.trento-project.io" LABEL org.opencontainers.image.source="https://github.com/trento-project/wanda" +LABEL org.opencontainers.image.version="%%VERSION%%-build%RELEASE%" +# endendlabelprefix + ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 -WORKDIR /app -COPY --from=release /build/wanda/_build/prod/rel/wanda . + +RUN zypper -n in trento-wanda + EXPOSE 4000/tcp -ENTRYPOINT ["/app/bin/wanda"] +WORKDIR /usr/lib/wanda/ +ENTRYPOINT ["/usr/lib/wanda/bin/wanda"]