This repository has been archived by the owner on Mar 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile
64 lines (56 loc) · 1.81 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM registry.fedoraproject.org/fedora:25
MAINTAINER Jonathan Lebon <[email protected]>
# NB: we install libyaml-devel so that we can use
# CSafeLoader in PyYAML (see related comment in the parser)
RUN dnf install -y \
git \
gcc \
sudo \
docker \
findutils \
python3-devel \
redhat-rpm-config \
python3-pip \
libyaml-devel \
nmap-ncat && \
dnf clean all
# There's a tricky bit here. We mount $PWD at $PWD in the
# container so that when we do the nested docker run in the
# main script, the paths the daemon receives will still be
# correct from the host perspective.
# We use --net=host here to be able to communicate with the
# internal OpenStack instance. For some reason, the default
# bridge docker sets up causes issues. Will debug this
# properly eventually.
LABEL RUN="/usr/bin/docker run --rm --privileged \
-v /run/docker.sock:/run/docker.sock \
-v \"\$PWD:\$PWD\" --workdir \"\$PWD\" \
--net=host \
-e github_repo \
-e github_branch \
-e github_pull_id \
-e github_commit \
-e github_contexts \
-e github_token \
-e os_keyname \
-e os_privkey \
-e os_network \
-e os_floating_ip_pool \
-e s3_prefix \
-e site_repos \
-e OS_AUTH_URL \
-e OS_TENANT_ID \
-e OS_TENANT_NAME \
-e OS_USERNAME \
-e OS_PASSWORD \
-e AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY \
-e BUILD_ID \
-e RHCI_DEBUG_NO_TEARDOWN \
-e RHCI_DEBUG_ALWAYS_RUN \
-e RHCI_DEBUG_USE_NODE \
\${OPT1} \
\${IMAGE}"
COPY . /src
RUN pip3 install -r /src/requirements.txt /src
CMD ["/usr/bin/papr"]