Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Synapse Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bilal El Hasnaoui
Synapse Ansible
Commits
58158406
Commit
58158406
authored
11 months ago
by
BILAL EL HASNAOUI
Browse files
Options
Downloads
Patches
Plain Diff
Feat: Add CI pipeline to deploy the synapse application
parent
4496e5db
No related branches found
No related tags found
No related merge requests found
Pipeline
#42854
failed
11 months ago
Stage: build
Stage: Config
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+95
-5
95 additions, 5 deletions
Dockerfile
with
95 additions
and
5 deletions
Dockerfile
+
95
−
5
View file @
58158406
# Dockerfile
FROM
ubuntu:14.04
# Use a base image with Python and pip installed
FROM
python:3
RUN
apt-get update
-y
&&
\
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
--no-install-recommends
\
acl
\
apache2
\
asciidoc
\
bzip2
\
cdbs
\
curl
\
debhelper
\
debianutils
\
devscripts
\
docbook-xml
\
dpkg-dev
\
fakeroot
\
gawk
\
gcc
\
git
\
libffi-dev
\
libssl-dev
\
libxml2-utils
\
locales
\
make
\
mercurial
\
mysql-server
\
openssh-client
\
openssh-server
\
python-dev
\
pass
\
python-httplib2
\
python-jinja2
\
python-keyczar
\
python-lxml
\
python-mock
\
python-mysqldb
\
python-nose
\
python-paramiko
\
python-passlib
\
python-pip
\
python-setuptools
\
python-virtualenv
\
python-yaml
\
reprepro
\
rsync
\
ruby
\
sshpass
\
subversion
\
sudo
\
tzdata
\
unzip
\
xsltproc
\
zip
\
&&
\
apt-get clean
# Install Ansibl
e
RUN
pip
install
ansible
RUN
pip
install
pip
--upgrad
e
RUN
pip
install
--upgrade
pycrypto cryptography
# helpful things taken from the ubuntu-upstart Dockerfile:
# https://github.com/tianon/dockerfiles/blob/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/Dockerfile
ADD
init-fake.conf /etc/init/fake-container-events.conf
# undo some leet hax of the base image
RUN
rm
/usr/sbin/policy-rc.d
;
\
rm
/sbin/initctl
;
dpkg-divert
--rename
--remove
/sbin/initctl
# remove some pointless services
RUN
/usr/sbin/update-rc.d
-f
ondemand remove
;
\
for
f
in
\
/etc/init/u
*
.conf
\
/etc/init/mounted-dev.conf
\
/etc/init/mounted-proc.conf
\
/etc/init/mounted-run.conf
\
/etc/init/mounted-tmp.conf
\
/etc/init/mounted-var.conf
\
/etc/init/hostname.conf
\
/etc/init/networking.conf
\
/etc/init/tty
*
.conf
\
/etc/init/plymouth
*
.conf
\
/etc/init/hwclock
*
.conf
\
/etc/init/module
*
.conf
\
;
do
\
dpkg-divert
--local
--rename
--add
"
$f
"
;
\
done
;
\
echo
'# /lib/init/fstab: cleared out for bare-bones Docker'
>
/lib/init/fstab
# end things from ubuntu-upstart Dockerfile
RUN
rm
/etc/apt/apt.conf.d/docker-clean
RUN
mkdir
/etc/ansible/
RUN
/bin/echo
-e
"[local]
\n
localhost ansible_connection=local"
>
/etc/ansible/hosts
RUN
locale-gen en_US.UTF-8
RUN
ssh-keygen
-q
-t
rsa
-N
''
-f
/root/.ssh/id_rsa
&&
\
cp
/root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
&&
\
for
key
in
/etc/ssh/ssh_host_
*
_key.pub
;
do
echo
"localhost
$(
cat
${
key
}
)
"
>>
/root/.ssh/known_hosts
;
done
VOLUME
/sys/fs/cgroup /run/lock /run /tmp
RUN
pip
install
coverage junit-xml
# Copy your playbook and inventory file into the container
COPY
playbooks/* /ansible/*
COPY
inventory.ini /ansible/inventory.ini
# Set the working directory
WORKDIR
/ansible
ENV
container=docker
CMD
["/sbin/init"]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment