-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (34 loc) · 1.67 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
# Get python slim or alpine. Alpine will be much smaller
FROM python:alpine
# Adding bash for Alpine doesn't carry it.
#RUN apk update
#RUN apk upgrade
RUN apk add --no-cache bash bash-completion
RUN apk add --no-cache openssh
#RUN apk add --no-cache gcc musl-dev python3-dev libffi-dev openssl-dev make
# Copy and install requirements seperately for layered caching
#COPY /Users/adhawale/.ssh/kentik_id_rsa ~/.ssh/id_rsa
COPY ./requirements.txt /kkonsole/config/
RUN pip install --upgrade pip
RUN pip install --trusted-host pypi.python.org -r /kkonsole/config/requirements.txt
#RUN pip install -r /kkonsole/config/requirements.txt
#RUN pip install paramiko
#RUN pip install ssh2-python
# Change workdir to the application
WORKDIR /kkonsole
# Copy everything else but requirements
COPY . /kkonsole
# The below RUN pip install . commands invoke the setup.py under kkonsole required for click
# Test run with --editable flag on
# --editable will allow you to update code and copy it to docker container and run the updated code without building the container again.
RUN pip install --editable .
#RUN pip install .
# Below -- commands for autocompletion in bash. <autocomplete href="http://click.palletsprojects.com/en/7.x/bashcomplete/"></autocomplete>
# THE BELOW RAN WHEN USED WITH --editable PIP PYTHON INSTALL AND MANUALLY ADDING THE BELOW COMMANDS.
# TRY WITH PATH AS ROOT KKONSOLE DIR; AND/OR USING A .SH SCRIPT AND USING RUN IN DOCKERFILE
#CMD _KPERFORM_COMPLETE=source kperform > /kkonsole/config/kperform-complete.sh \
# && touch ~/.bashrc \
# && echo ". /kkonsole/config/kperform-complete.sh" > ~/.bashrc \
# && source ~/.bashrc
#CMD ["python", "kkonsole.py"]
CMD ["/bin/bash"]