forked from Netflix/hubcommander
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (41 loc) · 1.65 KB
/
Dockerfile
File metadata and controls
51 lines (41 loc) · 1.65 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
41
42
43
44
45
46
47
48
49
50
51
FROM ubuntu:xenial
# Mostly Mike Grima: mgrima@netflix.com
MAINTAINER NetflixOSS <netflixoss@netflix.com>
# Install the Python RTM bot itself:
ARG RTM_VERSION
ADD python-rtmbot-${RTM_VERSION}.tar.gz /
RUN \
# Install Python:
apt-get update && \
apt-get upgrade -y && \
apt-get install python3 python3-venv nano -y
# Add all the other stuff to the plugins:
COPY / /python-rtmbot-${RTM_VERSION}/hubcommander
# Install all the things:
RUN \
# Rename the rtmbot:
mv /python-rtmbot-${RTM_VERSION} /rtmbot && \
# Set up the VENV:
pyvenv /venv && \
# Install all the deps:
/bin/bash -c "source /venv/bin/activate && pip install --upgrade pip" && \
/bin/bash -c "source /venv/bin/activate && pip install --upgrade setuptools" && \
/bin/bash -c "source /venv/bin/activate && pip install wheel" && \
/bin/bash -c "source /venv/bin/activate && pip install /rtmbot/hubcommander" && \
# The launcher script:
mv /rtmbot/hubcommander/launch_in_docker.sh / && chmod +x /launch_in_docker.sh && \
rm /rtmbot/hubcommander/python-rtmbot-${RTM_VERSION}.tar.gz
# DEFINE YOUR ENV VARS FOR SECRETS HERE:
ENV SLACK_TOKEN="REPLACEMEINCMDLINE" \
GITHUB_TOKEN="REPLACEMEINCMDLINE" \
TRAVIS_PRO_USER="REPLACEMEINCMDLINE" \
TRAVIS_PRO_ID="REPLACEMEINCMDLINE" \
TRAVIS_PRO_TOKEN="REPLACEMEINCMDLINE" \
TRAVIS_PUBLIC_USER="REPLACEMEINCMDLINE" \
TRAVIS_PUBLIC_ID="REPLACEMEINCMDLINE" \
TRAVIS_PUBLIC_TOKEN="REPLACEMEINCMDLINE" \
DUO_HOST="REPLACEMEINCMDLINE" \
DUO_IKEY="REPLACEMEINCMDLINE" \
DUO_SKEY="REPLACEMEINCMDLINE"
# Installation complete! Ensure that things can run properly:
ENTRYPOINT ["/bin/bash", "-c", "./launch_in_docker.sh"]