-
Notifications
You must be signed in to change notification settings - Fork 156
/
Dockerfile
50 lines (42 loc) · 1.78 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
FROM ubuntu:xenial
# Mostly Mike Grima: [email protected]
LABEL maintainer="[email protected]"
RUN \
# Install Python:
apt-get update && \
apt-get upgrade -y && \
apt-get install python3 python3-venv nano curl -y
# Install the Python RTM bot itself:
ARG RTM_VERSION="0.4.0"
ARG RTM_PATH="python-rtmbot-${RTM_VERSION}"
RUN curl -L https://github.com/slackhq/python-rtmbot/archive/${RTM_VERSION}.tar.gz > /${RTM_PATH}.tar.gz && tar xvzf python-rtmbot-0.4.0.tar.gz
# 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 /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"]