docker: Libervia revision can now be specified:
Using the `DOCKER_LIBERVIA_REV` environment variable, backend (and related repos) revision can now be specified. By default (variable empty or not set), the current `tip` version is used, and `dev` is used for tagging. If the variable is set, the revision will be used and used for tagging the image.
This commit is contained in:
parent
2152d57887
commit
a446d91c93
9 changed files with 83 additions and 32 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
FROM libervia/backend:dev
|
ARG REVISION=dev
|
||||||
|
FROM libervia/backend:${REVISION}
|
||||||
|
|
||||||
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
|
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
|
||||||
|
|
||||||
|
|
@ -46,7 +47,7 @@ USER libervia
|
||||||
RUN \
|
RUN \
|
||||||
# pytest and its plugins
|
# pytest and its plugins
|
||||||
pip install pytest pytest-timeout pytest-dependency \
|
pip install pytest pytest-timeout pytest-dependency \
|
||||||
# needed to test jp
|
# needed to test libervia-cli
|
||||||
sh \
|
sh \
|
||||||
# needed to test libervia
|
# needed to test libervia
|
||||||
helium \
|
helium \
|
||||||
|
|
@ -57,7 +58,7 @@ RUN \
|
||||||
|
|
||||||
RUN ./entrypoint.sh \
|
RUN ./entrypoint.sh \
|
||||||
# we create the file sharing component which will autoconnect when backend is started
|
# we create the file sharing component which will autoconnect when backend is started
|
||||||
jp profile create file_sharing -j files.server1.test -p "" --xmpp-password test_e2e -C file_sharing -A && \
|
li profile create file_sharing -j files.server1.test -p "" --xmpp-password test_e2e -C file_sharing -A && \
|
||||||
libervia-backend stop
|
libervia-backend stop
|
||||||
|
|
||||||
ENV LIBERVIA_TEST_REPORT_DIR=/reports
|
ENV LIBERVIA_TEST_REPORT_DIR=/reports
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
FROM debian:buster-slim
|
FROM debian:bullseye-slim
|
||||||
|
|
||||||
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
|
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
|
||||||
|
|
||||||
|
ARG REVISION
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update && apt-get upgrade -y && \
|
RUN echo "Building image for Libervia ${REVISION:-dev}" && \
|
||||||
|
apt-get update && apt-get upgrade -y && \
|
||||||
apt-get install -y --no-install-recommends locales python3-dev python3-venv python3-wheel mercurial libxml2-dev libxslt-dev libcairo2-dev libjpeg-dev libgirepository1.0-dev libdbus-1-dev libdbus-glib-1-dev dbus-x11 cmake && \
|
apt-get install -y --no-install-recommends locales python3-dev python3-venv python3-wheel mercurial libxml2-dev libxslt-dev libcairo2-dev libjpeg-dev libgirepository1.0-dev libdbus-1-dev libdbus-glib-1-dev dbus-x11 cmake && \
|
||||||
\
|
\
|
||||||
# will be used to put many SàT specific data
|
# will be used to put many Libervia specific data
|
||||||
mkdir -p /usr/share/libervia/certificates && \
|
mkdir -p /usr/share/libervia/certificates && \
|
||||||
addgroup tls-cert --gid 9999 && \
|
addgroup tls-cert --gid 9999 && \
|
||||||
chown :tls-cert /usr/share/libervia/certificates && \
|
chown :tls-cert /usr/share/libervia/certificates && \
|
||||||
|
|
@ -18,12 +20,12 @@ RUN apt-get update && apt-get upgrade -y && \
|
||||||
mkdir /src && chown libervia:libervia /src && \
|
mkdir /src && chown libervia:libervia /src && \
|
||||||
\
|
\
|
||||||
# we need UTF-8 locale
|
# we need UTF-8 locale
|
||||||
sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen && \
|
sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen
|
||||||
\
|
|
||||||
# we need a TCP socket for D-Bus
|
|
||||||
sed -i "s&<listen>unix:tmpdir=/tmp</listen>&\0\n <listen>tcp:host=localhost,bind=*,port=55555,family=ipv4</listen>\n <auth>ANONYMOUS</auth>\n <allow_anonymous/>&" /usr/share/dbus-1/session.conf
|
|
||||||
|
|
||||||
ENV LC_ALL en_US.UTF-8
|
ENV LC_ALL en_US.UTF-8
|
||||||
|
ENV DOCKER_LIBERVIA_REV=${REVISION:-dev}
|
||||||
|
|
||||||
|
COPY --chown=root:root session.conf /usr/share/dbus-1/session.conf
|
||||||
|
|
||||||
WORKDIR /home/libervia
|
WORKDIR /home/libervia
|
||||||
USER libervia
|
USER libervia
|
||||||
|
|
@ -34,15 +36,15 @@ RUN python3 -m venv libervia_env && libervia_env/bin/pip install -U pip wheel &&
|
||||||
# local repos without it them cause troubles
|
# local repos without it them cause troubles
|
||||||
hg clone https://repos.goffi.org/urwid-satext && ~/libervia_env/bin/pip install -e urwid-satext && \
|
hg clone https://repos.goffi.org/urwid-satext && ~/libervia_env/bin/pip install -e urwid-satext && \
|
||||||
mv urwid-satext/urwid_satext.egg-info ~/libervia_env/lib/python3.*/site-packages && \
|
mv urwid-satext/urwid_satext.egg-info ~/libervia_env/lib/python3.*/site-packages && \
|
||||||
hg clone https://repos.goffi.org/sat_tmp && ~/libervia_env/bin/pip install -e sat_tmp && \
|
hg clone https://repos.goffi.org/sat_tmp -u "${REVISION:-tip}" && ~/libervia_env/bin/pip install -e sat_tmp && \
|
||||||
mv sat_tmp/sat_tmp.egg-info ~/libervia_env/lib/python3.*/site-packages && \
|
mv sat_tmp/sat_tmp.egg-info ~/libervia_env/lib/python3.*/site-packages && \
|
||||||
hg clone https://repos.goffi.org/sat_templates && ~/libervia_env/bin/pip install -e sat_templates && \
|
hg clone https://repos.goffi.org/libervia-templates && ~/libervia_env/bin/pip install -e libervia-templates && \
|
||||||
mv sat_templates/libervia_templates.egg-info ~/libervia_env/lib/python3.*/site-packages && \
|
mv libervia-templates/libervia_templates.egg-info ~/libervia_env/lib/python3.*/site-packages && \
|
||||||
hg clone https://repos.goffi.org/sat_media && \
|
hg clone https://repos.goffi.org/libervia-media && \
|
||||||
hg clone https://repos.goffi.org/sat && ~/libervia_env/bin/pip install -e 'sat[SVG]' && \
|
hg clone https://repos.goffi.org/libervia-backend -u "${REVISION:-tip}" && ~/libervia_env/bin/pip install -e 'libervia-backend[SVG]' && \
|
||||||
mv sat/libervia_backend.egg-info ~/libervia_env/lib/python3.*/site-packages
|
mv libervia-backend/libervia_backend.egg-info ~/libervia_env/lib/python3.*/site-packages && \
|
||||||
|
mkdir -p /home/libervia/.local/share/libervia
|
||||||
|
|
||||||
ENV DBUS_SESSION_BUS_ADDRESS=tcp:host=backend,port=55555,family=ipv4
|
|
||||||
ENV PATH=/home/libervia/libervia_env/bin:$PATH
|
ENV PATH=/home/libervia/libervia_env/bin:$PATH
|
||||||
|
|
||||||
COPY --chown=root:root libervia.conf /etc/_libervia.conf
|
COPY --chown=root:root libervia.conf /etc/_libervia.conf
|
||||||
|
|
|
||||||
32
docker/backend-dev/session.conf
Normal file
32
docker/backend-dev/session.conf
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
|
||||||
|
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||||
|
<busconfig>
|
||||||
|
<type>session</type>
|
||||||
|
<keep_umask/>
|
||||||
|
<listen>unix:path=/home/libervia/.local/share/libervia/dbus_socket</listen>
|
||||||
|
<listen>tcp:host=localhost,bind=*,port=55555,family=ipv4</listen>
|
||||||
|
<auth>ANONYMOUS</auth>
|
||||||
|
<allow_anonymous/>
|
||||||
|
<standard_session_servicedirs />
|
||||||
|
<policy context="default">
|
||||||
|
<allow send_destination="*" eavesdrop="true"/>
|
||||||
|
<allow eavesdrop="true"/>
|
||||||
|
<allow own="*"/>
|
||||||
|
</policy>
|
||||||
|
<include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include>
|
||||||
|
<limit name="max_incoming_bytes">1000000000</limit>
|
||||||
|
<limit name="max_incoming_unix_fds">250000000</limit>
|
||||||
|
<limit name="max_outgoing_bytes">1000000000</limit>
|
||||||
|
<limit name="max_outgoing_unix_fds">250000000</limit>
|
||||||
|
<limit name="max_message_size">1000000000</limit>
|
||||||
|
<limit name="service_start_timeout">120000</limit>
|
||||||
|
<limit name="auth_timeout">240000</limit>
|
||||||
|
<limit name="pending_fd_timeout">150000</limit>
|
||||||
|
<limit name="max_completed_connections">100000</limit>
|
||||||
|
<limit name="max_incomplete_connections">10000</limit>
|
||||||
|
<limit name="max_connections_per_user">100000</limit>
|
||||||
|
<limit name="max_pending_service_starts">10000</limit>
|
||||||
|
<limit name="max_names_per_connection">50000</limit>
|
||||||
|
<limit name="max_match_rules_per_connection">50000</limit>
|
||||||
|
<limit name="max_replies_per_connection">50000</limit>
|
||||||
|
</busconfig>
|
||||||
|
|
@ -38,8 +38,11 @@ services:
|
||||||
LIBERVIA_PUBSUB_XMPP_PWD: test_e2e
|
LIBERVIA_PUBSUB_XMPP_PWD: test_e2e
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
image: libervia/backend:dev-e2e
|
image: libervia/backend:${DOCKER_LIBERVIA_REV:-dev}-e2e
|
||||||
build: backend-dev-e2e
|
build:
|
||||||
|
context: backend-dev-e2e
|
||||||
|
args:
|
||||||
|
REVISION: ${DOCKER_LIBERVIA_REV:-}
|
||||||
environment:
|
environment:
|
||||||
LIBERVIA_TEST_ENV_E2E: "1"
|
LIBERVIA_TEST_ENV_E2E: "1"
|
||||||
LIBERVIA_TEST_ENV_E2E_WEB: "1"
|
LIBERVIA_TEST_ENV_E2E_WEB: "1"
|
||||||
|
|
@ -54,8 +57,11 @@ services:
|
||||||
- libervia-backend.test
|
- libervia-backend.test
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: libervia/web:dev-e2e
|
image: libervia/web:${DOCKER_LIBERVIA_REV:-dev}-e2e
|
||||||
build: libervia-web-dev-e2e
|
build:
|
||||||
|
context: libervia-web-dev-e2e
|
||||||
|
args:
|
||||||
|
REVISION: ${DOCKER_LIBERVIA_REV:-}
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
environment:
|
environment:
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,17 @@ version: "3.6"
|
||||||
services:
|
services:
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
image: libervia/backend:dev
|
image: "libervia/backend:${DOCKER_LIBERVIA_REV:-dev}"
|
||||||
build: backend-dev
|
build:
|
||||||
|
context: backend-dev
|
||||||
|
args:
|
||||||
|
REVISION: "${DOCKER_LIBERVIA_REV:-}"
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: libervia/web:dev
|
image: "libervia/web:${DOCKER_LIBERVIA_REV:-dev}"
|
||||||
build: libervia-web-dev
|
build:
|
||||||
|
context: libervia-web-dev
|
||||||
|
args:
|
||||||
|
REVISION: "${DOCKER_LIBERVIA_REV:-}"
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
FROM libervia/web:dev
|
ARG REVISION=dev
|
||||||
|
FROM libervia/web:${REVISION}
|
||||||
|
|
||||||
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
|
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
FROM libervia/web:dev
|
ARG REVISION=dev
|
||||||
|
FROM libervia/web:${REVISION}
|
||||||
|
|
||||||
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
|
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
FROM libervia/backend:dev
|
ARG REVISION
|
||||||
|
FROM libervia/backend:${REVISION:-dev}
|
||||||
|
|
||||||
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
|
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
|
||||||
|
|
||||||
|
ARG REVISION
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
@ -9,9 +11,9 @@ USER root
|
||||||
RUN apt-get install -y --no-install-recommends yarnpkg
|
RUN apt-get install -y --no-install-recommends yarnpkg
|
||||||
WORKDIR /home/libervia
|
WORKDIR /home/libervia
|
||||||
USER libervia
|
USER libervia
|
||||||
RUN cd /src && hg clone https://repos.goffi.org/libervia && \
|
RUN cd /src && hg clone https://repos.goffi.org/libervia-web -u "${REVISION:-tip}" && \
|
||||||
~/libervia_env/bin/pip install -e libervia && \
|
~/libervia_env/bin/pip install -e libervia-web && \
|
||||||
mv libervia/libervia_web.egg-info ~/libervia_env/lib/python3.*/site-packages
|
mv libervia-web/libervia_web.egg-info ~/libervia_env/lib/python3.*/site-packages
|
||||||
|
|
||||||
RUN ./entrypoint.sh \
|
RUN ./entrypoint.sh \
|
||||||
# we build here to avoid re-downloading node modules or other browser
|
# we build here to avoid re-downloading node modules or other browser
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
FROM debian:buster-slim
|
FROM debian:bullseye-slim
|
||||||
|
|
||||||
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
|
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue