-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add php 5.6 with node, ruby and sass
- Loading branch information
Raffael Tancman
committed
May 18, 2016
1 parent
d6b1568
commit 183ee59
Showing
13 changed files
with
272 additions
and
3 deletions.
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
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
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,91 @@ | ||
FROM rtancman/docker-symfony:latest | ||
|
||
# skip installing gem documentation | ||
RUN mkdir -p /usr/local/etc \ | ||
&& { \ | ||
echo 'install: --no-document'; \ | ||
echo 'update: --no-document'; \ | ||
} >> /usr/local/etc/gemrc | ||
|
||
ENV RUBY_MAJOR 2.3 | ||
ENV RUBY_VERSION 2.3.1 | ||
ENV RUBY_DOWNLOAD_SHA256 b87c738cb2032bf4920fef8e3864dc5cf8eae9d89d8d523ce0236945c5797dcd | ||
ENV RUBYGEMS_VERSION 2.6.4 | ||
|
||
# some of ruby's build scripts are written in ruby | ||
# we purge this later to make sure our final image uses what we just built | ||
RUN set -ex \ | ||
&& buildDeps=' \ | ||
bison \ | ||
libgdbm-dev \ | ||
ruby \ | ||
' \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends $buildDeps \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ | ||
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ | ||
&& mkdir -p /usr/src/ruby \ | ||
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \ | ||
&& rm ruby.tar.gz \ | ||
&& cd /usr/src/ruby \ | ||
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \ | ||
&& autoconf \ | ||
&& ./configure --disable-install-doc \ | ||
&& make -j"$(nproc)" \ | ||
&& make install \ | ||
&& apt-get purge -y --auto-remove $buildDeps \ | ||
&& gem update --system $RUBYGEMS_VERSION \ | ||
&& rm -r /usr/src/ruby | ||
|
||
ENV BUNDLER_VERSION 1.12.3 | ||
|
||
RUN gem install bundler --version "$BUNDLER_VERSION" | ||
|
||
# install things globally, for great justice | ||
# and don't create ".bundle" in all our apps | ||
ENV GEM_HOME /usr/local/bundle | ||
ENV BUNDLE_PATH="$GEM_HOME" \ | ||
BUNDLE_BIN="$GEM_HOME/bin" \ | ||
BUNDLE_SILENCE_ROOT_WARNING=1 \ | ||
BUNDLE_APP_CONFIG="$GEM_HOME" | ||
ENV PATH $BUNDLE_BIN:$PATH | ||
RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \ | ||
&& chmod 777 "$GEM_HOME" "$BUNDLE_BIN" | ||
|
||
|
||
# gpg keys listed at https://github.com/nodejs/node | ||
RUN set -ex \ | ||
&& for key in \ | ||
9554F04D7259F04124DE6B476D5A82AC7E37093B \ | ||
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ | ||
0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93 \ | ||
FD3A5288F042B6850C66B31F09FE44734EB7990E \ | ||
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ | ||
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ | ||
B9AE9905FFD7803F25714661B63B535A4C206CA9 \ | ||
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ | ||
; do \ | ||
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ | ||
done | ||
|
||
ENV NPM_CONFIG_LOGLEVEL info | ||
ENV NODE_VERSION 6.1.0 | ||
|
||
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \ | ||
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ | ||
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ | ||
&& grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ | ||
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \ | ||
&& rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt | ||
|
||
RUN gem install sass | ||
RUN npm install -g grunt-cli | ||
RUN npm install -g grunt-contrib-sass --save-dev | ||
|
||
WORKDIR /var/www/html | ||
|
||
EXPOSE 9004 | ||
EXPOSE 9000 | ||
|
||
ENTRYPOINT ["/usr/local/bin/phpfpm-foreground"] |
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,2 @@ | ||
<h1>Hello World!!!</h1> | ||
<?php echo phpinfo() ?> |
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,19 @@ | ||
nginx: | ||
image: nginx:1.9.5 | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
links: | ||
- php | ||
- memcached | ||
volumes: | ||
- ./app:/var/www/html/dev | ||
- ./nginx/conf.d/app.conf:/etc/nginx/conf.d/default.conf | ||
- ./nginx/logs:/var/log/nginx | ||
memcached: | ||
image: memcached | ||
php: | ||
image: rtancman/docker-symfony:php-5.6-sass | ||
volumes: | ||
- ./app:/var/www/html/dev | ||
- ./phpfpm-foreground:/usr/local/bin/phpfpm-foreground |
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,49 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
root /var/www/html; | ||
|
||
index index.php; | ||
|
||
location ~ [^/]\.php(/|$) { | ||
fastcgi_split_path_info ^(.+?\.php)(/.*)$; | ||
if (!-f $document_root$fastcgi_script_name) { | ||
return 404; | ||
} | ||
|
||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | ||
|
||
fastcgi_pass app:9000; | ||
fastcgi_index index.php; | ||
} | ||
} | ||
|
||
server { | ||
listen 443; | ||
server_name localhost; | ||
root /var/www/html; | ||
|
||
ssl on; | ||
ssl_certificate /etc/nginx/ssl/nginx.crt; | ||
ssl_certificate_key /etc/nginx/ssl/nginx.key; | ||
|
||
index index.php; | ||
|
||
location ~ [^/]\.php(/|$) { | ||
fastcgi_split_path_info ^(.+?\.php)(/.*)$; | ||
if (!-f $document_root$fastcgi_script_name) { | ||
return 404; | ||
} | ||
|
||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | ||
|
||
fastcgi_pass app:9000; | ||
fastcgi_index index.php; | ||
} | ||
} |
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,28 @@ | ||
upstream phpfcgi { | ||
server php:9000; | ||
} | ||
|
||
server { | ||
listen 80; | ||
server_name localhost; | ||
root /var/www/html/dev; | ||
|
||
index index.php; | ||
|
||
location ~ [^/]\.php(/|$) { | ||
fastcgi_split_path_info ^(.+?\.php)(/.*)$; | ||
if (!-f $document_root$fastcgi_script_name) { | ||
return 404; | ||
} | ||
|
||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | ||
fastcgi_param HTTPS off; | ||
|
||
|
||
fastcgi_pass phpfcgi; | ||
fastcgi_index index.php; | ||
} | ||
} |
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,26 @@ | ||
server { | ||
listen 443; | ||
server_name localhost; | ||
root /var/www/html/dev; | ||
|
||
ssl on; | ||
ssl_certificate /etc/nginx/ssl/nginx.crt; | ||
ssl_certificate_key /etc/nginx/ssl/nginx.key; | ||
|
||
index index.php; | ||
|
||
location ~ [^/]\.php(/|$) { | ||
fastcgi_split_path_info ^(.+?\.php)(/.*)$; | ||
if (!-f $document_root$fastcgi_script_name) { | ||
return 404; | ||
} | ||
|
||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | ||
|
||
fastcgi_pass phpfcgi; | ||
fastcgi_index index.php; | ||
} | ||
} |
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 @@ | ||
.gitkeep |
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,21 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDfTCCAmWgAwIBAgIJAMUOKlrxSvoWMA0GCSqGSIb3DQEBCwUAMFUxCzAJBgNV | ||
BAYTAkJSMQ8wDQYDVQQIDAZCcmFzaWwxFzAVBgNVBAcMDlJpbyBkZSBKYW5laXJv | ||
MRwwGgYDVQQKDBNEZWZhdWx0IENvbXBhbnkgTHRkMB4XDTE1MTEyNjIxNTU0NFoX | ||
DTE2MTEyNTIxNTU0NFowVTELMAkGA1UEBhMCQlIxDzANBgNVBAgMBkJyYXNpbDEX | ||
MBUGA1UEBwwOUmlvIGRlIEphbmVpcm8xHDAaBgNVBAoME0RlZmF1bHQgQ29tcGFu | ||
eSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDEENAynU+hdumv | ||
tBQ6Y5Xw+fp7uSGeoRO3wAPQ734Kofd72KWDM9YG0v868azIxXeziPFn6HcYl1fa | ||
XimcvdIEyA7OfQjo5hZ2jetB9NPsHGmKmw6RdHCB1d7pkZRreWMLRAVTguvIZRl0 | ||
nz3uMCRsQVM5teQPbl7X3bbBS8pFxoMtBLFVAjx4cE4Mr8zZ4Uqg6dpW9ynvbAoF | ||
7yhey36LJa9pihwJJGKOqJr/DPbNnuXrs2OLyi53fxocB50Ne94T0ZZN7xyF/2xB | ||
DjDduNGhwbKjYDSyns7UIQIymBa+BsAqFOH+gUOGnDGHVZINhP9yOkNQvbFgqgai | ||
vpnWZqnBAgMBAAGjUDBOMB0GA1UdDgQWBBQr9zD1LksFGBERiElloINCWN1VUjAf | ||
BgNVHSMEGDAWgBQr9zD1LksFGBERiElloINCWN1VUjAMBgNVHRMEBTADAQH/MA0G | ||
CSqGSIb3DQEBCwUAA4IBAQAOt9wCu8lK82fMMIsb0rci9/vq0FhyW+9Zy/YDrBVd | ||
sm24QB3U4sdmXOxKWhGHRb3YGBI0XmXudo6t5rgEUc2aXDffw/kD2EaG+L+Klpj4 | ||
D+eODFZ58XiNwJiaUCUqTsSTU64Fns2xAHOgDCathcb3/mbuMMSZt+7sr/JTnALe | ||
o7EI5hM3EhA+eQmthMx5B9NVOmYsbuDa3p4SOaYKI7pRsZFL+O8rqU0+BtMVAPjC | ||
4jPxo5kAKjCI8pwFFQlJtR/UJ1Yb1CcvzmRuKqDrzR359FzeVKweADNzN83cKjzm | ||
ZoY0ciKHLhZQP8Mdc4F/FpxYvxcR0sXF9JkEE/K20QNQ | ||
-----END CERTIFICATE----- |
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,28 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDEENAynU+hdumv | ||
tBQ6Y5Xw+fp7uSGeoRO3wAPQ734Kofd72KWDM9YG0v868azIxXeziPFn6HcYl1fa | ||
XimcvdIEyA7OfQjo5hZ2jetB9NPsHGmKmw6RdHCB1d7pkZRreWMLRAVTguvIZRl0 | ||
nz3uMCRsQVM5teQPbl7X3bbBS8pFxoMtBLFVAjx4cE4Mr8zZ4Uqg6dpW9ynvbAoF | ||
7yhey36LJa9pihwJJGKOqJr/DPbNnuXrs2OLyi53fxocB50Ne94T0ZZN7xyF/2xB | ||
DjDduNGhwbKjYDSyns7UIQIymBa+BsAqFOH+gUOGnDGHVZINhP9yOkNQvbFgqgai | ||
vpnWZqnBAgMBAAECggEAUb9k30Wh1wOaiay+pl2xPckse/uDnf0xGHMR5EKGve4s | ||
HtIEqICrYysESdJMJWXX895MMPPG/FTVx3FtTjIC6AV1zvhpB5ovkXy4s0ZeOdra | ||
0nS2DUWMR0Yh7CbLyEfTWPYidmBm6KXmiC6BBtfBx/UwuyYwkZKGLu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5rGX89pC5k7eUm1TqNWv2VMa8jmmy | ||
cyFXYpbcFFfXx+TwMhmn5cY= | ||
-----END PRIVATE KEY----- |
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,4 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
exec php-fpm |
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