Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pavel Kuzin
tower
Commits
3572b99f
Commit
3572b99f
authored
Jul 03, 2017
by
Aleksey Shirokih
Browse files
debian based image
parent
77fa00b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
3572b99f
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
...
...
entrypoint.sh
View file @
3572b99f
#!/bin/bash
set
-e
set
-
x
e
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment