Commit 77fa00b1 authored by Aleksey Shirokih's avatar Aleksey Shirokih
Browse files

WIP: Alpine based image. abandoned. too big

parent 25499b1c
FROM python:2.7-alpine3.6
ENV ANSIBLE_HOST_KEY_CHECKING=False \
ANSIBLE_SSH_PIPELINING=1 \
ANSIBLE_STDOUT_CALLBACK=debug \
PYTHONUNBUFFERED=1 \
VERSION=${VERSION}
# install systemv packages
RUN apk add --update ca-certificates openssh-client vim sqlite curl git libffi-dev gcc musl-dev openssl-dev libffi\
&& mkdir -p /opt/tower \
&& pip install https://cdn.getnoc.com/tower/noc-tower-latest.zip \
&& apk del libffi-dev gcc musl-dev openssl-dev
WORKDIR /usr/local/
COPY entrypoint-alpine.sh /
STOPSIGNAL SIGINT
ENTRYPOINT ["/entrypoint-alpine.sh"]
VOLUME /usr/local/var/tower/
EXPOSE 8888
#!/bin/sh
set -xe
if [ ! -f /usr/local/var/tower/data/deploy_keys/id_rsa ]; then
mkdir -p /usr/local/var/tower/data/deploy_keys
ssh-keygen -t rsa -b 4096 -f /usr/local/var/tower/data/deploy_keys/id_rsa
chmod 0700 /usr/local/var/tower/data/deploy_keys/
cd /usr/local
mkdir -p /usr/local/var/tower/db /usr/local/var/tower/cache /usr/local/var/tower/repo
mkdir -p /usr/local/var/tower/log/jobs /usr/local/var/tower/log/crashinfo/collect
mkdir -p /usr/local/var/tower/ansible/cp /usr/local/var/tower/crashinfo
mkdir -p /usr/local/var/tower/data/src_dist/
fi
if [ $# -eq 0 ]; then
./bin/tower-web
else
exec "$@"
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