Commit 3572b99f authored by Aleksey Shirokih's avatar Aleksey Shirokih
Browse files

debian based image

parent 77fa00b1
FROM debian:latest
ARG VERSION=${VERSION}
ENV PATH /opt/tower/bin:${PATH}
ENV ANSIBLE_HOST_KEY_CHECKING=False \
ANSIBLE_SSH_PIPELINING=1 \
......@@ -10,9 +9,10 @@ ENV ANSIBLE_HOST_KEY_CHECKING=False \
# install systemv packages
RUN apt-get update \
&& apt-get install -y \
&& apt-get install -y --no-install-recommends \
python-virtualenv \
virtualenv \
ca-certificates \
python-setuptools \
libffi6 libffi-dev \
python-dev gcc \
......@@ -25,16 +25,16 @@ RUN apt-get update \
git \
&& rm -rf /var/cache/apk/* \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /opt/tower
# Install tower
COPY dist/noc-tower-${VERSION}.zip /tmp/
&& mkdir /opt/tower \
&& curl https://cdn.getnoc.com/tower/noc-tower-latest.zip -Lo /tmp/noc-tower-latest.zip \
&& virtualenv /opt/tower \
&& /opt/tower/bin/pip install /tmp/noc-tower-latest.zip \
&& rm /tmp/noc-tower-latest.zip \
&& apt-get -y purge libffi6 libffi-dev python-dev gcc libssl-dev gcc-6 cpp-6 libc6-dev \
&& apt-get -y autoremove
WORKDIR /opt/tower
RUN virtualenv . \
&& ./bin/pip install /tmp/noc-tower-${VERSION}.zip
COPY entrypoint.sh /
STOPSIGNAL SIGINT
......
#!/bin/bash
set -e
set -xe
if [ ! -f /opt/tower/var/tower/data/deploy_keys/id_rsa ]; then
mkdir -p /opt/tower/var/tower/data/deploy_keys
......@@ -10,10 +10,11 @@ if [ ! -f /opt/tower/var/tower/data/deploy_keys/id_rsa ]; then
mkdir -p /opt/tower/var/tower/db /opt/tower/var/tower/cache /opt/tower/var/tower/repo
mkdir -p /opt/tower/var/tower/log/jobs /opt/tower/var/tower/log/crashinfo/collect
mkdir -p /opt/tower/var/tower/ansible/cp /opt/tower/var/tower/crashinfo
mkdir -p /opt/tower/var/tower/data/src_dist/
fi
if [ $# -eq 0 ]; then
./bin/tower-web
else
exec "$@"
fi
\ No newline at end of file
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment