-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (33 loc) · 1.07 KB
/
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
34
35
36
37
38
39
40
FROM python:3.7-slim
LABEL description.short="DACCS image updater"
LABEL description.long="DACCS image updater"
LABEL maintainer="Mathieu Provencher <[email protected]>"
LABEL vendor="CRIM"
LABEL version="0.1"
# setup paths
ENV APP_DIR=/opt/local/src/daccs-image-updater
ENV TEST_DIR=${APP_DIR}/tests/integration
WORKDIR ${APP_DIR}
# install package dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
jq \
git \
curl \
lsof \
ssh-client
# install GitHub's hub CLI tool
RUN wget -O hub.tgz --progress=dot:mega https:/github/hub/releases/download/v2.14.2/hub-linux-amd64-2.14.2.tgz
RUN mkdir /hub
RUN tar -xvf hub.tgz -C /hub --strip-components 1
RUN bash /hub/install
# configure github account. Defaults, overridden by GITHUB_USER
RUN git config --global user.email "[email protected]"
RUN git config --global user.name "birdhouse-deploy updater bot"
RUN hub config --global hub.protocol https
# install
COPY ./ ${APP_DIR}
WORKDIR ${TEST_DIR}
RUN pip install -r requirements.txt
WORKDIR ${APP_DIR}
CMD ["bash"]