Skip to content

Commit

Permalink
change base image and update dependencies (#545)
Browse files Browse the repository at this point in the history
* change base image and update dependencies

* set rust version to 1.81, which is the current stable in BCI
  • Loading branch information
stefanotorresi authored Jan 20, 2025
1 parent e54977f commit 84f0e0e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
elixir 1.15.7-otp-26
erlang 26.2.1
rust 1.66.1
rust 1.81
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM opensuse/leap:15.6 AS elixir-build
FROM registry.suse.com/bci/rust:1.81 AS elixir-build
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
RUN zypper ar https://download.opensuse.org/repositories/devel:sap:trento:builddeps/15.6 buildeps
RUN zypper -n --gpg-auto-import-keys ref
RUN zypper -n in git-core elixir==1.15 elixir-hex erlang==26 erlang-rebar3 rust cargo
RUN zypper -n in git-core elixir==1.15 elixir-hex erlang==26 erlang-rebar3
COPY . /build
WORKDIR /build
ARG MIX_ENV=prod
Expand All @@ -22,13 +22,15 @@ ENV MIX_PATH=/usr/lib/elixir/lib/hex/ebin
RUN mix phx.digest
RUN mix release

FROM opensuse/leap:15.6
FROM registry.suse.com/bci/bci-base:15.6
LABEL org.opencontainers.image.source="https://github.com/trento-project/wanda"
ARG MIX_ENV=prod
ENV MIX_ENV=$MIX_ENV
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# Erlang runtime dependencies
RUN zypper -n in libsystemd0 libopenssl1_1
WORKDIR /app
COPY --from=release /build/_build/$MIX_ENV/rel/wanda .
VOLUME /usr/share/trento/checks
Expand Down
6 changes: 4 additions & 2 deletions packaging/suse/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#!UseOBSRepositories
#!ExclusiveArch: x86_64

FROM registry.suse.com/bci/rust:1.66 AS release
FROM registry.suse.com/bci/rust:1.81 AS release
ADD wanda.tar.gz /build/
RUN zypper -n in git-core elixir==1.15 elixir-hex erlang==26 erlang-rebar3
WORKDIR /build/wanda/
Expand All @@ -20,13 +20,15 @@ ENV VERSION=%%VERSION%%
RUN mix phx.digest
RUN mix release

FROM registry.suse.com/bci/rust:1.66
FROM registry.suse.com/bci/bci-base:15.6
# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=com.suse.trento
LABEL org.opencontainers.image.source="https://github.com/trento-project/wanda"
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# Erlang runtime dependencies
RUN zypper -n in libsystemd0 libopenssl1_1
WORKDIR /app
COPY --from=release /build/wanda/_build/prod/rel/wanda .
VOLUME /usr/share/trento/checks
Expand Down
5 changes: 3 additions & 2 deletions packaging/suse/rpm/trento-wanda.spec
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ URL: https://github.com/trento-project/wanda
Source: %{name}-%{version}.tar.gz
Source1: deps.tar.gz
Group: System/Monitoring
BuildRequires: elixir >= 1.15
BuildRequires: elixir == 1.15
BuildRequires: erlang == 24
BuildRequires: elixir-hex
BuildRequires: erlang-rebar3
BuildRequires: git-core
BuildRequires: rust+cargo >= 1.66
BuildRequires: rust+cargo == 1.81
Requires: trento-checks

%description
Expand Down

0 comments on commit 84f0e0e

Please sign in to comment.