Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update community container image to use fixed versions from leap15.6 #3217

Merged
merged 4 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM opensuse/tumbleweed AS elixir-build
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN zypper -n in make gcc git-core elixir elixir-hex erlang-rebar3
FROM opensuse/leap:15.6 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 make gcc git-core elixir==1.15 elixir-hex erlang==26 erlang-rebar3
COPY . /build
WORKDIR /build
ARG MIX_ENV=prod
Expand All @@ -19,20 +21,23 @@
FROM elixir-build AS release
COPY --from=assets-build /build /build
WORKDIR /build
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
ARG MIX_ENV=prod
ENV MIX_ENV=$MIX_ENV
ENV MIX_HOME=/usr/bin
ENV MIX_REBAR3=/usr/bin/rebar3
ENV MIX_PATH=/usr/lib/elixir/lib/hex/ebin
RUN mix phx.digest
RUN mix release

FROM opensuse/tumbleweed AS trento
FROM opensuse/leap:15.6
LABEL org.opencontainers.image.source="https://github.com/trento-project/web"
ARG MIX_ENV=prod
ENV LANG en_US.UTF-8

Check warning on line 38 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build and push pull request container image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LANGUAGE en_US:en

Check warning on line 39 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build and push pull request container image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LC_ALL en_US.UTF-8

Check warning on line 40 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build and push pull request container image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
# tar is required by kubectl cp
RUN zypper -n in tar
WORKDIR /app
Expand Down
22 changes: 10 additions & 12 deletions packaging/suse/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@
#!UseOBSRepositories
#!ExclusiveArch: x86_64

FROM bci/nodejs:20 AS assets-build
FROM registry.suse.com/bci/nodejs:20 AS assets-build
ADD web.tar.gz /build/
WORKDIR /build/web/assets
RUN npm run tailwind:build
RUN npm run build

FROM bci/bci-base:15.4 AS release
# Workaround for https://github.com/openSUSE/obs-build/issues/487
RUN zypper --non-interactive in sles-release
RUN zypper -n in make gcc git-core elixir>=1.15 elixir-hex erlang-rebar3
FROM registry.suse.com/bci/bci-base:15.6 AS release
RUN zypper -n in make gcc git-core elixir==1.15 elixir-hex erlang==26 erlang-rebar3
COPY --from=assets-build /build /build
WORKDIR /build/web/
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
ENV MIX_ENV=prod
ENV MIX_HOME=/usr/bin
ENV MIX_REBAR3=/usr/bin/rebar3
Expand All @@ -28,13 +26,13 @@ ENV VERSION=%%VERSION%%
RUN mix phx.digest
RUN mix release

FROM bci/bci-base:15.4 AS trento
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/web"
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
# tar is required by kubectl cp
RUN zypper -n in tar
WORKDIR /app
Expand Down
Loading