-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
25 lines (18 loc) · 895 Bytes
/
dockerfile
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
FROM ubuntu:18.04
RUN apt-get update -y && apt install -y git cmake gnupg libffi-dev libssl-dev libcurl4-openssl-dev python3-pip python3-dev
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
USER appuser
# Grab the latest agent code
RUN git clone https://github.com/APImetrics/Agent .
# Install pip requirements
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install -r requirements.txt
# This is what we could call from docker-compose:
# CMD ["python3", "-m", "apimetrics_agent"]