Skip to content

Commit b6ce6fa

Browse files
committed
Remove references to bcgovimages/von-image
- Switch base image to a plain python image for better maintainability. Signed-off-by: Wade Barnes <[email protected]>
1 parent 0e9694b commit b6ce6fa

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

fetch-validator-status/Dockerfile

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,59 @@
1-
FROM bcgovimages/von-image:node-1.12-6
1+
FROM python:3.10-slim-bullseye
2+
3+
ARG uid=1001
4+
ARG user=indy
5+
ARG tag_name=indy-node-monitor
6+
ARG tag_version=
7+
8+
ENV HOME="/home/$user" \
9+
APP_ROOT="$HOME" \
10+
LC_ALL=C.UTF-8 \
11+
LANG=C.UTF-8 \
12+
PIP_NO_CACHE_DIR=off \
13+
PYTHONUNBUFFERED=1 \
14+
PYTHONIOENCODING=UTF-8 \
15+
RUST_LOG=warning \
16+
SHELL=/bin/bash \
17+
SUMMARY="Indy Node Monitor" \
18+
DESCRIPTION="A container for monitoring the nodes of an Indy Node network."
19+
20+
LABEL summary="$SUMMARY" \
21+
description="$DESCRIPTION" \
22+
io.k8s.description="$DESCRIPTION" \
23+
io.k8s.display-name="$tag_name $tag_version" \
24+
name="$tag_name" \
25+
version="$tag_version" \
26+
maintainer=""
27+
28+
# Add local binaries and aliases to path
29+
ENV PATH="$HOME/.local/bin:$PATH"
30+
31+
# Make libraries resolvable by python
32+
ENV LD_LIBRARY_PATH="$HOME/.local/lib:$LD_LIBRARY_PATH"
33+
RUN echo "$HOME/.local/lib" > /etc/ld.so.conf.d/local.conf && ldconfig
34+
35+
# Add indy user
36+
RUN useradd -U -ms /bin/bash -u $uid $user
37+
WORKDIR $HOME
38+
39+
# - In order to drop the root user, we have to make some directories writable
40+
# to the root group as OpenShift default security model is to run the container
41+
# under random UID.
42+
RUN usermod -a -G 0 indy
43+
44+
# Create standard directories to allow volume mounting and set permissions
45+
# Note: PIP_NO_CACHE_DIR environment variable should be cleared to allow caching
46+
RUN mkdir -p \
47+
$HOME/log \
48+
$(python -m site --user-site)
49+
50+
# The root group needs access the directories under $HOME for the container to function in OpenShift.
51+
# Also ensure the permissions on the python 'site-packages' folder are set correctly.
52+
RUN chown -R indy:root $HOME && \
53+
chmod -R ug+rw $HOME && \
54+
chmod +rx $(python -m site --user-site)
55+
56+
USER $user
257

358
ADD requirements.txt .
459
RUN pip3 install --upgrade pip

fetch-validator-status/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ oauth2client
55
fastapi
66
uvicorn
77
gunicorn
8+
9+
base58
810
indy-vdr

0 commit comments

Comments
 (0)