Skip to content

Commit

Permalink
Add suse packaging Dockerfile
Browse files Browse the repository at this point in the history
Co-authored-by: rtorrero <[email protected]>
  • Loading branch information
nelsonkopliku and rtorrero committed Jan 20, 2023
1 parent 9cc1f18 commit 12fe492
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
32 changes: 32 additions & 0 deletions packaging/suse/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# SPDX-License-Identifier: Apache-2.0
#!BuildTag: trento/trento-wanda:latest
#!BuildTag: trento/trento-wanda:%%VERSION%%
#!BuildTag: trento/trento-wanda:%%VERSION%%-build%RELEASE%
#!UseOBSRepositories

FROM bci/rust:1.66 AS release
ADD wanda.tar.gz /build/
# Workaround for https://github.com/openSUSE/obs-build/issues/487
RUN zypper --non-interactive in sles-release
RUN zypper -n in elixir 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 VERSION=%%VERSION%%
RUN mix phx.digest
RUN mix release

FROM bci/rust:1.66 AS wanda
# 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
WORKDIR /app
COPY --from=release /build/wanda/_build/prod/rel/wanda .
EXPOSE 4000/tcp
ENTRYPOINT ["/app/bin/wanda"]
7 changes: 7 additions & 0 deletions packaging/suse/_constraints
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<constraints>
<hardware>
<disk>
<size unit="G">8</size>
</disk>
</hardware>
</constraints>
4 changes: 4 additions & 0 deletions packaging/suse/_service
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<services>
<service mode="buildtime" name="docker_label_helper"/>
<service mode="buildtime" name="kiwi_metainfo_helper"/>
</services>

0 comments on commit 12fe492

Please sign in to comment.