File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,9 +2,15 @@ FROM docker.io/apache/airflow:2.5.1-python3.8
22
33# quick sudo
44USER root
5- RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A8D3785C
6- RUN apt-get update && apt-get install make && apt-get install build-essential git -y && apt-get install -y wget && apt-get install -y unzip
7- RUN apt install -y default-jre
5+
6+ RUN apt-get update && apt-get install -y \
7+ build-essential=12.9 \
8+ default-jre=2:1.11-72 \
9+ git=1:2.30.2-1+deb11u2 \
10+ make=4.3-4.1 \
11+ wget=1.21-1+deb11u1 \
12+ unzip=6.0-26+deb11u1 \
13+ && rm -rf /var/lib/apt/lists/*
814
915# back to normal user
1016USER airflow
@@ -14,20 +20,7 @@ COPY requirements.txt /opt/airflow
1420
1521# working in the /opt/airflow
1622WORKDIR /opt/airflow
17- RUN mkdir -p ./.rmlmapper ./dags ./ted_sws
18-
19- COPY ted_sws /opt/airflow/ted_sws
20-
21- COPY dags /opt/airflow/dags
22-
23- RUN wget -c https://github.com/RMLio/rmlmapper-java/releases/download/v6.2.2/rmlmapper-6.2.2-r371-all.jar -O ./.rmlmapper/rmlmapper.jar
24-
25-
26- RUN wget -c https://github.com/Saxonica/Saxon-HE/releases/download/SaxonHE10-9/SaxonHE10-9J.zip -P .saxon/
27- RUN cd .saxon && unzip SaxonHE10-9J.zip && rm -rf SaxonHE10-9J.zip
28-
29- RUN mkdir -p ./.limes
30- RUN wget -c https://github.com/dice-group/LIMES/releases/download/1.7.9/limes.jar -P ./.limes
23+ RUN mkdir -p ./dags ./ted_sws
3124
3225
3326RUN pip install --upgrade pip
Original file line number Diff line number Diff line change @@ -2,9 +2,15 @@ FROM docker.io/apache/airflow:2.5.1-python3.8
22
33# quick sudo
44USER root
5- RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A8D3785C
6- RUN apt-get update && apt-get install make && apt-get install build-essential git -y && apt-get install -y wget && apt-get install -y unzip
7- RUN apt install -y default-jre
5+
6+ RUN apt-get update && apt-get install -y \
7+ build-essential=12.9 \
8+ default-jre=2:1.11-72 \
9+ git=1:2.30.2-1+deb11u2 \
10+ make=4.3-4.1 \
11+ wget=1.21-1+deb11u1 \
12+ unzip=6.0-26+deb11u1 \
13+ && rm -rf /var/lib/apt/lists/*
814
915# back to normal user
1016USER airflow
@@ -14,20 +20,7 @@ COPY requirements.txt /opt/airflow
1420
1521# working in the /opt/airflow
1622WORKDIR /opt/airflow
17- RUN mkdir -p ./.rmlmapper ./dags ./ted_sws
18-
19- COPY ted_sws /opt/airflow/ted_sws
20-
21- COPY dags /opt/airflow/dags
22-
23- RUN wget -c https://github.com/RMLio/rmlmapper-java/releases/download/v6.2.2/rmlmapper-6.2.2-r371-all.jar -O ./.rmlmapper/rmlmapper.jar
24-
25-
26- RUN wget -c https://github.com/Saxonica/Saxon-HE/releases/download/SaxonHE10-9/SaxonHE10-9J.zip -P .saxon/
27- RUN cd .saxon && unzip SaxonHE10-9J.zip && rm -rf SaxonHE10-9J.zip
28-
29- RUN mkdir -p ./.limes
30- RUN wget -c https://github.com/dice-group/LIMES/releases/download/1.7.9/limes.jar -P ./.limes
23+ RUN mkdir -p ./dags ./ted_sws
3124
3225
3326RUN pip install --upgrade pip
Original file line number Diff line number Diff line change @@ -9,4 +9,13 @@ RUN pip install --upgrade pip
99RUN pip install -r digest_service/requirements.txt
1010RUN pip install -r digest_service/project_requirements.txt
1111
12+ # Create a non-root user and group
13+ RUN groupadd -r appuser && useradd -r -g appuser appuser
14+
15+ # Set the appropriate permissions for the directories and files
16+ RUN chown -R appuser:appuser /usr/src/api/id_manager
17+
18+ # Switch to the non-root user
19+ USER appuser
20+
1221ENTRYPOINT uvicorn --host 0.0.0.0 --port 8000 ted_sws.notice_transformer.entrypoints.api.digest_service.main:app
Original file line number Diff line number Diff line change @@ -2,4 +2,22 @@ FROM docker.io/secoresearch/fuseki:4.5.0
22
33USER root
44RUN apt-get update; \
5- apt-get install -y --no-install-recommends procps
5+ apt-get install -y --no-install-recommends procps
6+
7+
8+ # Create a non-root user and group
9+ RUN groupadd -r fuseki && useradd -r -g fuseki fuseki
10+
11+ # Ensure the /fuseki-base and /fuseki-data directories exist and set permissions
12+ RUN mkdir -p /fuseki-base /fuseki-data/databases /tmp && \
13+ chown -R fuseki:fuseki /fuseki-base /fuseki-data /tmp
14+
15+ # Switch to the non-root user
16+ USER fuseki
17+
18+
19+
20+
21+
22+
23+
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ pydantic~=1.9.0
33requests ~= 2.28.2
44deepdiff ~= 5.7.0
55jinja2 ~= 3.1.2
6- python-dotenv ~= 0.19.2
6+ python-dotenv ~= 0.21.0
77pymongo ~= 4.0.1
88apache-airflow ~= 2.5.1
99hvac == 0.11.2
@@ -27,3 +27,4 @@ certifi~=2022.12.7
2727shortuuid ~= 1.0.11
2828pendulum ~= 2.1.2
2929saxonche ~= 12.4
30+ elasticsearch-dbapi == 0.2.11
You can’t perform that action at this time.
0 commit comments