Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5bf8664e2a | ||
|
0009e461d1 | ||
|
a7c60d11ed | ||
|
45dca773b7 | ||
|
0ccfe0a1a7 | ||
|
82f0b2d452 | ||
|
8db8d4fb7f |
@ -1 +1,2 @@
|
|||||||
|
.git/
|
||||||
image*bz2
|
image*bz2
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
image: docker:latest
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- test
|
|
||||||
- build
|
|
||||||
|
|
||||||
variables:
|
|
||||||
VERSION: php53
|
|
||||||
DOCKER_IMAGE: leenooks/lamps
|
|
||||||
DOCKER_REGISTRY: registry.leenooks.net
|
|
||||||
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
|
|
||||||
|
|
||||||
services:
|
|
||||||
- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- docker info
|
|
||||||
- docker version
|
|
||||||
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY}
|
|
||||||
|
|
||||||
test:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- cat /etc/hosts
|
|
||||||
- env|sort
|
|
||||||
- docker build -t ${DOCKER_IMAGE}:${VERSION} .
|
|
||||||
- docker images
|
|
||||||
only:
|
|
||||||
- debug
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
script:
|
|
||||||
- docker build -t ${DOCKER_IMAGE}:${VERSION} .
|
|
||||||
- docker tag ${DOCKER_IMAGE}:${VERSION} ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
|
|
||||||
- docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
only:
|
|
||||||
- master
|
|
29
Dockerfile
29
Dockerfile
@ -1,29 +1,12 @@
|
|||||||
# NAME leenooks/lamps
|
# NAME leenooks/lamps
|
||||||
# VERSION php54
|
# VERSION php54
|
||||||
# BUILD docker build -t="leenooks/lamps" .
|
|
||||||
# START docker run -dp 80:80 [-p 443:443 ] -p 2022:22 \
|
|
||||||
# -e NO_MAIL=TRUE \
|
|
||||||
# -e NO_DB=TRUE \
|
|
||||||
# -v /srv/lamps/sites.d:/etc/httpd/sites.d \
|
|
||||||
# -v /srv/lamps/sites.html:/var/www/sites \
|
|
||||||
# -v /srv/lamps/mariadb/server.cnf:/etc/my.cnf.d/server.cnf
|
|
||||||
# -v /srv/lamps/mariadb/data:/var/lib/mysql
|
|
||||||
# -v /srv/lamps/user:/home/lamp \
|
|
||||||
# -v /srv/lamps/mail/opendkim:/etc/opendkim \
|
|
||||||
# -v /srv/lamps/mail/sendmail.mc:/etc/mail/sendmail.mc \
|
|
||||||
# -v /srv/lamps/tsm/TSM.PWD:/etc/adsm/TSM.PWD \
|
|
||||||
# -v /srv/lamps/tsm/dsm.sys:/etc/adsm/TSM.PWD \
|
|
||||||
# -v /dev/log:/dev/log \
|
|
||||||
# -v /srv/lamps/dsm.sys:/opt/tivoli/tsm/client/api/bin64/dsm.sys \
|
|
||||||
# -v /srv/lamps/dsm.opt:/opt/tivoli/tsm/client/api/bin64/dsm.opt \
|
|
||||||
# --hostname=www.example.com \
|
|
||||||
# --restart=always --name=lamp leenooks/hosting $@
|
|
||||||
# CRON: docker exec -it lamp /usr/sbin/awstats.sh
|
|
||||||
|
|
||||||
FROM registry.leenooks.net/leenooks/base:7
|
FROM registry.leenooks.net/leenooks/base:7
|
||||||
|
|
||||||
RUN yum -y install epel-release && yum clean all
|
RUN yum -y install epel-release && yum clean all
|
||||||
|
|
||||||
|
RUN yum -y install tsmpipe && yum clean all
|
||||||
|
|
||||||
# EPEL & Leenooks packages
|
# EPEL & Leenooks packages
|
||||||
RUN yum -y install \
|
RUN yum -y install \
|
||||||
httpd \
|
httpd \
|
||||||
@ -52,15 +35,17 @@ COPY .my.cnf /root/
|
|||||||
COPY 10-default.conf /etc/httpd/conf.d/
|
COPY 10-default.conf /etc/httpd/conf.d/
|
||||||
RUN ln -f /etc/.ln/httpd/conf.d/awstats.conf /etc/httpd/conf.d/awstats.conf && ln -f /etc/.ln/opendkim.conf /etc/opendkim.conf
|
RUN ln -f /etc/.ln/httpd/conf.d/awstats.conf /etc/httpd/conf.d/awstats.conf && ln -f /etc/.ln/opendkim.conf /etc/opendkim.conf
|
||||||
|
|
||||||
RUN useradd -c "Hosting Admin User" -m lamp
|
RUN useradd -c "Hosting Admin User" -m lamp -G apache
|
||||||
|
|
||||||
|
VOLUME [ "/etc/ssh" ]
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
|
|
||||||
|
LABEL cron.hourly root:/usr/sbin/awstats.sh
|
||||||
|
LABEL cron.daily root:/usr/bin/tdp.mysql.sh -s information_schema:performance_schema
|
||||||
|
|
||||||
# Starting
|
# Starting
|
||||||
COPY init /sbin/
|
COPY init /sbin/
|
||||||
ENTRYPOINT [ "/sbin/init" ]
|
ENTRYPOINT [ "/sbin/init" ]
|
||||||
CMD [ "start" ]
|
CMD [ "start" ]
|
||||||
|
|
||||||
RUN yum -y install tsmpipe && yum clean all
|
|
||||||
|
|
||||||
RUN useradd -rc "Composer" -m composer -s /sbin/nologin && su composer -s /bin/bash -lc "composer global require laravel/installer && composer require --dev --no-update xethron/migrations-generator:dev-l5 && composer require --dev --no-update way/generators:dev-feature/laravel-five-stable && composer config repositories.repo-name git git@github.com:jamisonvalenta/Laravel-4-Generators.git"
|
RUN useradd -rc "Composer" -m composer -s /sbin/nologin && su composer -s /bin/bash -lc "composer global require laravel/installer && composer require --dev --no-update xethron/migrations-generator:dev-l5 && composer require --dev --no-update way/generators:dev-feature/laravel-five-stable && composer config repositories.repo-name git git@github.com:jamisonvalenta/Laravel-4-Generators.git"
|
||||||
|
2
init
2
init
@ -38,7 +38,7 @@ if [ "$1" == "start" ]; then
|
|||||||
echo "Starting SSHD..."
|
echo "Starting SSHD..."
|
||||||
getent passwd lamp || useradd -c "Hosting Admin User" -m lamp
|
getent passwd lamp || useradd -c "Hosting Admin User" -m lamp
|
||||||
[ -x /usr/sbin/sshd-keygen ] && /usr/sbin/sshd-keygen
|
[ -x /usr/sbin/sshd-keygen ] && /usr/sbin/sshd-keygen
|
||||||
[ -x /usr/sbin/sshd ] && /usr/sbin/sshd
|
[ -x /usr/sbin/sshd ] && /usr/sbin/sshd -D &
|
||||||
else
|
else
|
||||||
echo "! NOT starting SSH"
|
echo "! NOT starting SSH"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user