-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (29 loc) · 1.11 KB
/
Dockerfile
File metadata and controls
40 lines (29 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND noninteractive
ENV LANG C.UTF-8
# Install Python 3 & pip
RUN apt-get update -qq && \
apt-get install -y software-properties-common python3-pip && \
rm -rf /var/lib/apt/lists/*
# Install libindy
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \
add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic stable" && \
apt-get update -qq && \
apt-get install -y libindy && \
rm -rf /var/lib/apt/lists/*
# Optianally set uid & gid at build time
ARG USER_ID
ARG GROUP_ID
# Create unprivileged user & group "app"
RUN groupadd -g ${GROUP_ID:-1000} app && \
useradd -l -u ${USER_ID:-1000} -g app app && \
install -d -m 0755 -o app -g app /home/app
USER app
# Install required python libraries
COPY --chown=app:app ./pyserverforindy/requirements.txt /app/pyserverforindy/requirements.txt
RUN pip3 install --no-cache-dir -r /app/pyserverforindy/requirements.txt
# Add project files to image
COPY --chown=app:app . /app
VOLUME /home/app/.indy_client
CMD ["python3", "/app/pyserverforindy/grpc_server/server.py"]
EXPOSE 50051