Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM php:7.0-apache
MAINTAINER Ian Droogmans <[email protected]>

# Install base packages
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
rubygems \
&& \
gem install sass

# Add entrypoint
ADD docker-entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '2'
services:
php:
build: .
ports:
- "8002:80"
environment:
CSSCOMPILER: "SASS"
volumes:
- .:/var/www/html
entrypoint: "/entrypoint.sh"
command: "apache2-foreground"
13 changes: 13 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -e
echo "Start of entrypoint"
if [ "$1" = 'apache2-foreground' ]; then
echo "starting compiler checks"
if [ "$CSSCOMPILER" = "SASS" ]; then
echo "Starting SASS compiler."
nohup sass --watch scss/:css/ > ${logDir}/$(/bin/date +%Y%m%d.%H%M).sass_watch.log 2>&1 &
fi
fi
echo "End of entrypoint"

exec "$@"