-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
33 lines (24 loc) · 896 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
26
27
28
29
30
31
32
33
FROM python:3-slim AS repo-resource
RUN apt update \
&& apt install -y git procps \
&& apt upgrade -y \
&& apt autoremove \
&& rm -rf /var/lib/apt/lists/*
RUN git config --global user.email [email protected] \
&& git config --global user.name repo-resource \
&& git config --global color.ui never
COPY ssh_config /root/.ssh/config
COPY repo_resource/requirements.txt /opt/resource/requirements.txt
RUN pip install -r opt/resource/requirements.txt
COPY repo_resource/check.py /opt/resource/check
COPY repo_resource/in_.py /opt/resource/in
COPY repo_resource/out.py /opt/resource/out
COPY repo_resource/common.py /opt/resource/repo_resource/common.py
RUN chmod +x /opt/resource/*
FROM repo-resource AS tests
# unit/smoke testing
COPY repo_resource /root/repo_resource
COPY development/ssh/ /root/development/ssh/
WORKDIR /root/
CMD python -m unittest
FROM repo-resource