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
1 changed files with 83 additions and 32 deletions
|
|
@ -1,13 +1,15 @@
|
|||
FROM debian:buster-slim
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
|
||||
|
||||
ARG REVISION
|
||||
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 && \
|
||||
\
|
||||
# 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 && \
|
||||
addgroup tls-cert --gid 9999 && \
|
||||
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 && \
|
||||
\
|
||||
# we need UTF-8 locale
|
||||
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
|
||||
sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen
|
||||
|
||||
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
|
||||
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
|
||||
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 && \
|
||||
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 && \
|
||||
hg clone https://repos.goffi.org/sat_templates && ~/libervia_env/bin/pip install -e sat_templates && \
|
||||
mv sat_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/sat && ~/libervia_env/bin/pip install -e 'sat[SVG]' && \
|
||||
mv sat/libervia_backend.egg-info ~/libervia_env/lib/python3.*/site-packages
|
||||
hg clone https://repos.goffi.org/libervia-templates && ~/libervia_env/bin/pip install -e libervia-templates && \
|
||||
mv libervia-templates/libervia_templates.egg-info ~/libervia_env/lib/python3.*/site-packages && \
|
||||
hg clone https://repos.goffi.org/libervia-media && \
|
||||
hg clone https://repos.goffi.org/libervia-backend -u "${REVISION:-tip}" && ~/libervia_env/bin/pip install -e 'libervia-backend[SVG]' && \
|
||||
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
|
||||
|
||||
COPY --chown=root:root libervia.conf /etc/_libervia.conf
|
||||
|
|
|
|||
Loading…
Reference in a new issue