Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Loading status checks…
First tests passing
Jim Van Fleet
committed
Jul 29, 2016
1 parent
85aca2f
commit 410de79
Showing
3 changed files
with
80 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
FROM bigfleet/centos7base | ||
|
||
# Define args and set a default value | ||
ARG maintainer=tier | ||
ARG imagename=lamp | ||
ARG tagname=20160727-dev | ||
ARG version=1.0 | ||
|
||
|
||
MAINTAINER $maintainer | ||
LABEL Vendor="Internet2" | ||
LABEL ImageType="COmanage" | ||
LABEL ImageName=$imagename | ||
LABEL TagName=$tagname | ||
LABEL ImageOS=centos7 | ||
LABEL Version=$version | ||
|
||
LABEL Build docker build --rm --tag $registry/$maintainer/$imagename:$tagname . | ||
|
||
# Install deps. | ||
RUN yum -y install \ | ||
httpd \ | ||
mysql-devel \ | ||
mysql-libs \ | ||
mod_ssl \ | ||
php \ | ||
php-openssl \ | ||
php-cli \ | ||
php-ldap \ | ||
php-mbstring \ | ||
php-mcrypt \ | ||
php-mysql \ | ||
php-pear-MDB2-Driver-mysqli \ | ||
php-pecl-memcached \ | ||
php-xml \ | ||
&& yum clean all | ||
|
||
# | ||
# UTC Timezone & Networking | ||
# | ||
RUN ln -sf /usr/share/zoneinfo/UTC /etc/localtime && \ | ||
echo "NETWORKING=yes" > /etc/sysconfig/network | ||
|
||
# | ||
# Global PHP configuration changes | ||
# | ||
RUN sed -i \ | ||
-e 's~^;date.timezone =$~date.timezone = Europe/Rome~g' \ | ||
-e 's~^;user_ini.filename =$~user_ini.filename =~g' \ | ||
/etc/php.ini | ||
|
||
RUN echo '<?php phpinfo(); ?>' > /var/www/html/index.php | ||
|
||
# Port | ||
EXPOSE 80 443 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
maintainer="bigfleet" | ||
imagename="lamp" | ||
imagename="lamp" | ||
version="1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bats | ||
|
||
load ../common | ||
|
||
setup() { | ||
echo $PWD > test.log | ||
./bin/rebuild.sh | ||
} | ||
|
||
@test "Should be buildable" { | ||
run bin/build.sh | ||
[ "$status" -eq 0 ] | ||
} | ||
|
||
@test "Concludes first-run experience" { | ||
result="$(docker run -i $maintainer/$imagename find /tmp/firsttimerunning)" | ||
[ "$result" != '' ] | ||
} | ||
|
||
@test "Contains php" { | ||
run docker run -i $maintainer/$imagename which php | ||
[ "$status" -eq 0 ] | ||
} |