Dockerfile 903 Bytes
Newer Older
Aleksey Shirokih's avatar
Aleksey Shirokih committed
1
2
FROM debian:latest

Aleksey Shirokih's avatar
fix    
Aleksey Shirokih committed
3
ARG VERSION=${VERSION}
Aleksey Shirokih's avatar
fix    
Aleksey Shirokih committed
4
5
ENV PATH /opt/tower/bin:${PATH}
ENV ANSIBLE_HOST_KEY_CHECKING=False \
Aleksey Shirokih's avatar
Aleksey Shirokih committed
6
    ANSIBLE_SSH_PIPELINING=1 \
7
    ANSIBLE_STDOUT_CALLBACK=debug \
Aleksey Shirokih's avatar
Aleksey Shirokih committed
8
9
    PYTHONUNBUFFERED=1 \
    VERSION=${VERSION}
Aleksey Shirokih's avatar
Aleksey Shirokih committed
10

Aleksey Shirokih's avatar
Aleksey Shirokih committed
11
12
# install systemv packages
RUN apt-get update \
13
 && apt-get install -y \
Aleksey Shirokih's avatar
Aleksey Shirokih committed
14
15
16
17
18
19
20
        python-virtualenv \
        virtualenv \
        python-setuptools \
        libffi6 libffi-dev \
        python-dev gcc \
        openssh-client \
        libssl-dev \
21
        vim-tiny \
Aleksey Shirokih's avatar
Aleksey Shirokih committed
22
        sqlite3 \
23
24
        curl \
        telnet \
Aleksey Shirokih's avatar
Aleksey Shirokih committed
25
    && rm -rf /var/cache/apk/* \
Aleksey Shirokih's avatar
Aleksey Shirokih committed
26
    && rm -rf /var/lib/apt/lists/* \
27
    && mkdir /opt/tower
Aleksey Shirokih's avatar
Aleksey Shirokih committed
28

Aleksey Shirokih's avatar
Aleksey Shirokih committed
29
# Install tower
Aleksey Shirokih's avatar
fix    
Aleksey Shirokih committed
30
COPY dist/noc-tower-${VERSION}.zip /tmp/
Aleksey Shirokih's avatar
Aleksey Shirokih committed
31

32
WORKDIR /opt/tower
Aleksey Shirokih's avatar
Aleksey Shirokih committed
33

Aleksey Shirokih's avatar
Aleksey Shirokih committed
34
RUN virtualenv . \
Aleksey Shirokih's avatar
fix    
Aleksey Shirokih committed
35
    && ./bin/pip install /tmp/noc-tower-${VERSION}.zip
Aleksey Shirokih's avatar
Aleksey Shirokih committed
36
37
38

COPY entrypoint.sh /

Aleksey Shirokih's avatar
fix    
Aleksey Shirokih committed
39
40
STOPSIGNAL SIGINT

Aleksey Shirokih's avatar
Aleksey Shirokih committed
41
ENTRYPOINT ["/entrypoint.sh"]
Aleksey Shirokih's avatar
Aleksey Shirokih committed
42

Aleksey Shirokih's avatar
Aleksey Shirokih committed
43
44
VOLUME /opt/tower/var

Aleksey Shirokih's avatar
Aleksey Shirokih committed
45
EXPOSE 8888