comparison docker/libervia-web-dev/Dockerfile @ 3641:0ffaa231138c

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.
author Goffi <goffi@goffi.org>
date Wed, 08 Sep 2021 11:14:17 +0200
parents 443b3a784eba
children 1680eec4cbfd
comparison
equal deleted inserted replaced
3640:f4c02bdb2d91 3641:0ffaa231138c
1 FROM libervia/backend:dev 1 ARG REVISION
2 FROM libervia/backend:${REVISION:-dev}
2 3
3 LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>" 4 LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>"
4 5
6 ARG REVISION
5 ARG DEBIAN_FRONTEND=noninteractive 7 ARG DEBIAN_FRONTEND=noninteractive
6 8
7 USER root 9 USER root
8 10
9 RUN apt-get install -y --no-install-recommends yarnpkg 11 RUN apt-get install -y --no-install-recommends yarnpkg
10 WORKDIR /home/libervia 12 WORKDIR /home/libervia
11 USER libervia 13 USER libervia
12 RUN cd /src && hg clone https://repos.goffi.org/libervia && \ 14 RUN cd /src && hg clone https://repos.goffi.org/libervia-web -u "${REVISION:-tip}" && \
13 ~/libervia_env/bin/pip install -e libervia && \ 15 ~/libervia_env/bin/pip install -e libervia-web && \
14 mv libervia/libervia_web.egg-info ~/libervia_env/lib/python3.*/site-packages 16 mv libervia-web/libervia_web.egg-info ~/libervia_env/lib/python3.*/site-packages
15 17
16 RUN ./entrypoint.sh \ 18 RUN ./entrypoint.sh \
17 # we build here to avoid re-downloading node modules or other browser 19 # we build here to avoid re-downloading node modules or other browser
18 # dependencies on each run 20 # dependencies on each run
19 libervia-web fg -- --build-only && \ 21 libervia-web fg -- --build-only && \