-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
26 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,42 @@ | ||
FROM opensuse/leap AS elixir-build | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
RUN zypper -n addrepo https://download.opensuse.org/repositories/devel:/languages:/erlang/SLE_15_SP3/devel:languages:erlang.repo | ||
RUN zypper -n --gpg-auto-import-keys ref -s | ||
RUN zypper -n in elixir | ||
COPY . /build | ||
WORKDIR /build | ||
ENV MIX_ENV=prod | ||
RUN mix local.rebar --force \ | ||
&& mix local.hex --force \ | ||
&& mix deps.get | ||
|
||
#!BuildTag: trento/trento-web:latest | ||
#!BuildTag: trento/trento-web:%%VERSION%% | ||
#!BuildTag: trento/trento-web:%%VERSION%%-build%RELEASE% | ||
#!UseOBSRepositories | ||
|
||
FROM registry.suse.com/bci/nodejs:16 AS assets-build | ||
COPY --from=elixir-build /build /build | ||
WORKDIR /build/assets | ||
RUN npm install | ||
FROM bci/nodejs:16 AS assets-build | ||
ADD web.tar.gz /build/ | ||
WORKDIR /build/web/assets | ||
RUN npm run tailwind:build | ||
RUN npm run build | ||
|
||
FROM elixir-build AS release | ||
FROM suse/sle15:15.3 AS release | ||
# FLAVOR defined in prjconf, e.g. | ||
# BuildFlags: dockerarg:FLAVOR=Community | ||
ARG FLAVOR=Community | ||
# # 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 | ||
COPY --from=assets-build /build /build | ||
WORKDIR /build | ||
WORKDIR /build/web/ | ||
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 FLAVOR="$FLAVOR" | ||
RUN mix phx.digest | ||
RUN mix release | ||
|
||
|
||
FROM registry.suse.com/bci/bci-base:15.3 AS trento | ||
FROM suse/sle15:15.3 AS trento | ||
# 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 | ||
# tar is required by kubectl cp | ||
RUN zypper -n in tar | ||
WORKDIR /app | ||
COPY --from=release /build/_build/prod/rel/trento . | ||
COPY --from=release /build/web/_build/prod/rel/trento . | ||
EXPOSE 4000/tcp | ||
ENTRYPOINT ["/app/bin/trento"] |
This file was deleted.
Oops, something went wrong.