-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (26 loc) · 1.08 KB
/
Dockerfile
File metadata and controls
40 lines (26 loc) · 1.08 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:rolling
MAINTAINER jon.m.lemaster-1@ou.edu
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf8
RUN apt-get update && apt-get upgrade -y && apt-get install -y python3-pip ipython3
ENV GRPC_PYTHON_VERSION 1.15.0
RUN apt-get install -y libprotoc-dev protobuf-compiler
RUN python3 -m pip install --upgrade pip && python3 -m pip install click grpcio grpcio-tools
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Build python stuff
COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt
COPY . /usr/src/app
# Create the protobuf files
# RUN protoc --python_out=. mutualStore.proto # Code below works similarly
RUN python3 -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. mutualStore.proto
RUN pip install rsa
EXPOSE 22
EXPOSE 80
EXPOSE 50050-50100
# Unbuffer to see logs with docker logs <containername>
ENV PYTHONUNBUFFERED=1
# Run the node
CMD ["python3", "mutualStore.py", "store", "mutualStore.py"]