Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M3P2 HTML Generator
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
12
Issues
12
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
M3P2
M3P2 HTML Generator
Commits
cd2d07e5
Commit
cd2d07e5
authored
Mar 18, 2019
by
Administrator
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a Dockerfile.
A pretty dirty one, if you ask me.
parent
5dfdf80f
Pipeline
#11
passed with stage
in 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
0 deletions
+88
-0
Dockerfile
Dockerfile
+88
-0
No files found.
Dockerfile
0 → 100644
View file @
cd2d07e5
FROM
php:7.2-apache
LABEL
maintainer="Andy Miller <rhuk@getgrav.org> (@rhukster)"
# Enable Apache Rewrite + Expires Module
RUN
a2enmod rewrite expires
# Install dependencies
RUN
apt-get update
&&
apt-get
install
-y
\
git
\
unzip
\
fortunes
\
cowsay
\
libfreetype6-dev
\
libjpeg62-turbo-dev
\
libpng-dev
\
libyaml-dev
\
&&
docker-php-ext-install opcache
\
&&
docker-php-ext-configure gd
--with-freetype-dir
=
/usr/include/
--with-jpeg-dir
=
/usr/include/
\
&&
docker-php-ext-install
-j
$(
nproc
)
gd
\
&&
docker-php-ext-install zip
# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN
{
\
echo
'opcache.memory_consumption=128'
;
\
echo
'opcache.interned_strings_buffer=8'
;
\
echo
'opcache.max_accelerated_files=4000'
;
\
echo
'opcache.revalidate_freq=2'
;
\
echo
'opcache.fast_shutdown=1'
;
\
echo
'opcache.enable_cli=1'
;
\
echo
'upload_max_filesize=128M'
;
\
echo
'post_max_size=128M'
;
\
}
>
/usr/local/etc/php/conf.d/php-recommended.ini
# provide container inside image for data persistance
# VOLUME /var/www/html
# We are using docker-compose for volumes :
# - /var/docker-volumes/courses/pages:/var/www/html/user/pages:Z
# - /var/docker-volumes/courses/accounts:/var/www/html/user/accounts:Z
# - /var/docker-volumes/courses/data:/var/www/html/user/data:Z
# Make sure accounts and data are writable. Make sure pages isn't. (for now)
RUN
pecl
install
apcu
\
&&
pecl
install
yaml
\
&&
docker-php-ext-enable apcu yaml
# Set user to www-data
RUN
chown
www-data:www-data /var/www
USER
www-data
# Define Grav version and expected SHA1 signature
#ENV GRAV_VERSION 1.5.5
#ENV GRAV_SHA1 af0433facdae1afeb1d973a66db2315c5022b10d
# Install grav todo: shallow clone?
WORKDIR
/var/www
RUN
git clone https://m3p2.ljbac.com/m3p2/grav-website.git grav
\
&&
mv
-T
/var/www/grav /var/www/html
# curl -o grav-admin.zip -SL https://getgrav.org/download/core/grav-admin/${GRAV_VERSION} && \
# echo "$GRAV_SHA1 grav-admin.zip" | sha1sum -c - && \
# unzip grav-admin.zip && \
# mv -T /var/www/grav-admin /var/www/html && \
# rm grav-admin.zip
WORKDIR
/var/www/html/bin
RUN
php
-r
"copy('https://getcomposer.org/installer', 'composer-setup.php');"
\
&&
php composer-setup.php
\
&&
php
-r
"unlink('composer-setup.php');"
# Grab the courses, since we're not using submodules (yet)
WORKDIR
/var/www/html
RUN
rm
-R
user/pages
\
&&
git clone https://m3p2.ljbac.com/m3p2/courses.git user/pages
#RUN bin/clone_courses.sh
# Grav will handle "composer install" internally
RUN
bin/grav
# Return to root user
USER
root
# Copy init scripts
# COPY docker-entrypoint.sh /entrypoint.sh
# ENTRYPOINT ["/entrypoint.sh"]
# CMD ["apache2-foreground"]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment