Skip to content

Commit

Permalink
Merge pull request #27 from jumanjiman/alpine
Browse files Browse the repository at this point in the history
reduce image size and speed up builds
  • Loading branch information
Carlos Bautista committed Mar 12, 2015
2 parents 4e147a4 + 6ea6b8b commit 8ba1e77
Show file tree
Hide file tree
Showing 28 changed files with 101 additions and 238 deletions.
63 changes: 0 additions & 63 deletions Dockerfile

This file was deleted.

8 changes: 0 additions & 8 deletions DockerfileFTPData

This file was deleted.

23 changes: 8 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ with CentOS 6.5 and a LAMP stack of:
* Python


Build locally
-------------

Clone this git repo, then run:

script/build


Deployment
----------

Expand Down Expand Up @@ -64,21 +72,6 @@ sudo nsenter --target $PID --mount --uts --ipc --net --pid
```


OVAL vulnerability scan
-----------------------

The docker build runs a vulnerability scan.
You can also perform the scan inside an existing build via:

docker run --rm -t quay.io/iseexchange/tacstack /oval/vulnerability-scan.sh

See https://github.com/jumanjihouse/oval for details.

TODO: Implement some sort of CD system to poll the OVAL feed and rebuild
the image on any update. https://github.com/jumanjiman/docker-gocd may be
a candidate for the solution.


Contributing
------------

Expand Down
59 changes: 59 additions & 0 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
FROM gliderlabs/alpine:latest

# Please list packages, one per line, in alpha order.
RUN apk-install \
alpine-sdk \
apache2 \
bash \
bash-completion \
libffi \
libffi-dev \
libxml2 \
libxml2-dev \
libxslt \
libxslt-dev \
mysql \
mysql-client \
mysql-dev \
openssh \
openssh-client \
php \
php-dev \
php-gd \
php-memcache \
phpmyadmin \
php-mysql \
php-pspell \
php-snmp \
php-xml \
php-xmlrpc \
py-libxml2 \
py-libxslt \
py-nose \
py-pip \
python \
python-dev \
subversion \
supervisor \
vim \
;

RUN pip install "pip>=1.4,<1.5" --upgrade
RUN pip install MySQL-python robotframework lxml python-etcd

# Configure sshd.
RUN ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key && ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key
RUN sed -ri 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config && echo 'root:changeme' | chpasswd

# Ports: 22=ssh, 80=http, 3306=mysql, 18900=MAP 18901=RobotTestPort
EXPOSE 22 80 3306 18900 18901

COPY src /

# Start mysql service and create admin user with changeme password
#RUN /etc/init.d/mysql setup; \
# /etc/init.d/mysql start; \
# sleep 10s; \
# echo "CREATE USER 'admin'@'localhost' IDENTIFIED BY 'changeme'; GRANT ALL PRIVILEGES ON *.* TO admin@'%' WITH GRANT OPTION; FLUSH PRIVILEGES; SET PASSWORD FOR admin@'%'=PASSWORD('changeme');" | mysql

CMD ["supervisord", "-n"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 7 additions & 1 deletion src/files/supervisord.conf → app/src/etc/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ autorestart=true ; retstart at unexpected quit (default: true)
startretries=3 ; max # of serial start failures (default 3)

[program:mysql]
command = /usr/bin/pidproxy /var/run/mysqld/mysqld.pid /usr/bin/mysqld_safe
#command = /usr/bin/pidproxy /var/run/mysqld/mysqld.pid /usr/bin/mysqld_safe
command = /usr/bin/mysqld_safe
stdout_logfile=/var/log/mysqld.log
stderr_logfile=/var/log/mysqld.log
autostart=true ; start at supervisord start (default: true)
autorestart=true ; retstart at unexpected quit (default: true)
startretries=3 ; max # of serial start failures (default 3)
File renamed without changes.
1 change: 1 addition & 0 deletions app/src/root/.bash_profile
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added app/src/run/openrc/softlevel
Empty file.
File renamed without changes.
15 changes: 15 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://circleci.com/docs/docker
machine:
services:
- docker

dependencies:
override:
- docker info
- docker images
- script/build
- docker images

test:
override:
- script/test
4 changes: 4 additions & 0 deletions ftpdata/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM gliderlabs/alpine:latest

VOLUME /var/ftp/pub/uploads
CMD /bin/sh
3 changes: 3 additions & 0 deletions script/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

docker build -t tacstack app/
4 changes: 4 additions & 0 deletions script/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

# Todo: add test harness
:
5 changes: 0 additions & 5 deletions src/files/phpinfo.php

This file was deleted.

4 changes: 0 additions & 4 deletions src/manifests/init.pp

This file was deleted.

21 changes: 0 additions & 21 deletions src/manifests/packages.pp

This file was deleted.

78 changes: 0 additions & 78 deletions src/manifests/params.pp

This file was deleted.

39 changes: 0 additions & 39 deletions src/manifests/services.pp

This file was deleted.

1 change: 0 additions & 1 deletion src/test/init.pp

This file was deleted.

1 change: 0 additions & 1 deletion src/test/packages.pp

This file was deleted.

1 change: 0 additions & 1 deletion src/test/params.pp

This file was deleted.

1 change: 0 additions & 1 deletion src/test/services.pp

This file was deleted.

0 comments on commit 8ba1e77

Please sign in to comment.