projects
/
osm
/
devops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ubuntu version updated to 20.04
[osm/devops.git]
/
docker
/
POL
/
Dockerfile
diff --git
a/docker/POL/Dockerfile
b/docker/POL/Dockerfile
index
8a39a85
..
f143b62
100644
(file)
--- a/
docker/POL/Dockerfile
+++ b/
docker/POL/Dockerfile
@@
-20,22
+20,19
@@
# contact: bdiaz@whitestack.com or glavado@whitestack.com
##
# contact: bdiaz@whitestack.com or glavado@whitestack.com
##
-FROM ubuntu:
16
.04
+FROM ubuntu:
20
.04
LABEL authors="Benjamín Díaz"
LABEL authors="Benjamín Díaz"
-RUN apt-get --yes update \
- && apt-get --yes install python3 python3-pip libmysqlclient-dev git \
- && pip3 install pip==9.0.3
+RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \
+ && DEBIAN_FRONTEND=noninteractive apt-get -y install \
+ git python3 python3-pip libmysqlclient-dev libssl-dev libffi-dev \
+ mysql-client curl software-properties-common
-RUN apt-get update && apt-get -y install curl software-properties-common
-
-RUN apt-get --yes update \
- && apt-get --yes install git python python-pip python3 python3-pip libmysqlclient-dev libssl-dev libffi-dev \
- && pip3 install pip==9.0.3
+RUN pip3 install pip==21.0.1
ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
-ARG RELEASE=Release
FOUR
-daily
+ARG RELEASE=Release
NINE
-daily
ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
ARG REPOSITORY=testing
ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
ARG REPOSITORY=testing
@@
-45,7
+42,10
@@
RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} POL c
ARG POL_VERSION
ARG COMMON_VERSION
ARG POL_VERSION
ARG COMMON_VERSION
-RUN apt-get --yes update && apt-get -y install python3-osm-policy-module${POL_VERSION}
+RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \
+ && DEBIAN_FRONTEND=noninteractive apt-get -y install python3-osm-policy-module${POL_VERSION}
+
+COPY scripts/ scripts/
ENV OSMPOL_MESSAGE_DRIVER kafka
ENV OSMPOL_MESSAGE_HOST kafka
ENV OSMPOL_MESSAGE_DRIVER kafka
ENV OSMPOL_MESSAGE_HOST kafka
@@
-58,4
+58,7
@@
ENV OSMPOL_SQL_DATABASE_URI sqlite:///mon_sqlite.db
ENV OSMPOL_GLOBAL_LOG_LEVEL INFO
ENV OSMPOL_GLOBAL_LOG_LEVEL INFO
-CMD osm-policy-agent
+HEALTHCHECK --start-period=120s --interval=10s --timeout=5s --retries=5 \
+ CMD osm-pol-healthcheck || exit 1
+
+CMD /bin/bash scripts/start.sh