Mercurial > libervia-backend
comparison docker/pubsub/Dockerfile @ 3497:73e04040d577
docker: update following name changes:
`backend_e2e` now print properly backend logs
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 16 Apr 2021 18:32:16 +0200 |
parents | d2298ed6de7f |
children | 443b3a784eba |
comparison
equal
deleted
inserted
replaced
3496:c018c510a562 | 3497:73e04040d577 |
---|---|
1 FROM debian:buster-slim | 1 FROM debian:buster-slim |
2 | 2 |
3 LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>" | 3 LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>" |
4 | 4 |
5 ARG DEBIAN_FRONTEND=noninteractive | 5 ARG DEBIAN_FRONTEND=noninteractive |
6 | |
7 RUN \ | |
8 | 6 |
9 RUN apt-get update && apt-get upgrade -y && \ | 7 RUN apt-get update && apt-get upgrade -y && \ |
10 apt-get install -y --no-install-recommends locales python3-dev python3-venv python3-wheel mercurial libpq-dev gcc gnupg && \ | 8 apt-get install -y --no-install-recommends locales python3-dev python3-venv python3-wheel mercurial libpq-dev gcc gnupg && \ |
11 # we install postgresql repository to have latest version | 9 # we install postgresql repository to have latest version |
12 echo "deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \ | 10 echo "deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \ |
13 python3 -c 'from urllib.request import urlopen; print(urlopen("https://www.postgresql.org/media/keys/ACCC4CF8.asc").read().decode())' | apt-key add - && \ | 11 python3 -c 'from urllib.request import urlopen; print(urlopen("https://www.postgresql.org/media/keys/ACCC4CF8.asc").read().decode())' | apt-key add - && \ |
14 # now we can install the client | 12 # now we can install the client |
15 apt-get install -y --no-install-recommends postgresql-client && \ | 13 apt-get install -y --no-install-recommends postgresql-client && \ |
16 # it's better to have a dedicated user | 14 # it's better to have a dedicated user |
17 useradd -m sat && \ | 15 useradd -m libervia && \ |
18 mkdir /src && chown sat:sat /src && \ | 16 mkdir /src && chown libervia:libervia /src && \ |
19 # we need UTF-8 locale | 17 # we need UTF-8 locale |
20 sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen | 18 sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen |
21 | 19 |
22 ENV LC_ALL en_US.UTF-8 | 20 ENV LC_ALL en_US.UTF-8 |
23 | 21 |
24 WORKDIR /home/sat | 22 WORKDIR /home/libervia |
25 COPY entrypoint.sh /home/sat | 23 COPY entrypoint.sh /home/libervia |
26 RUN chown sat:sat /home/sat/entrypoint.sh && chmod 0555 /home/sat/entrypoint.sh | 24 RUN chown libervia:libervia /home/libervia/entrypoint.sh && chmod 0555 /home/libervia/entrypoint.sh |
27 | 25 |
28 USER sat | 26 USER libervia |
29 RUN python3 -m venv sat_env && sat_env/bin/pip install wheel && cd /src && \ | 27 RUN python3 -m venv libervia_env && libervia_env/bin/pip install -U pip wheel && cd /src && \ |
30 # we install thoses packages in editable mode, so we can replace them easily with volumes | 28 # we install thoses packages in editable mode, so we can replace them easily with volumes |
31 hg clone https://repos.goffi.org/sat_tmp && ~/sat_env/bin/pip install -e sat_tmp && \ | 29 hg clone https://repos.goffi.org/sat_tmp && ~/libervia_env/bin/pip install -e sat_tmp && \ |
32 mv sat_tmp/sat_tmp.egg-info ~/sat_env/lib/python3.*/site-packages && \ | 30 mv sat_tmp/sat_tmp.egg-info ~/libervia_env/lib/python3.*/site-packages && \ |
33 hg clone https://repos.goffi.org/sat_pubsub && ~/sat_env/bin/pip install -e sat_pubsub && \ | 31 hg clone https://repos.goffi.org/sat_pubsub && ~/libervia_env/bin/pip install -e sat_pubsub && \ |
34 mv sat_pubsub/sat_pubsub.egg-info ~/sat_env/lib/python3.*/site-packages | 32 mv sat_pubsub/sat_pubsub.egg-info ~/libervia_env/lib/python3.*/site-packages |
35 | 33 |
36 ENTRYPOINT ["/home/sat/entrypoint.sh"] | 34 ENTRYPOINT ["/home/libervia/entrypoint.sh"] |