Skip to content

Commit

Permalink
Merge branch 'release/2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisAlejandro committed Jun 24, 2019
2 parents b3c9976 + 846946e commit 4f02f7b
Show file tree
Hide file tree
Showing 23 changed files with 734 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.1.5
current_version = 2.2.0
tag_name = {new_version}
commit = True
tag = True
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ ruby/*/*.sh
node/*/*.sh
mongo/*/*.sh
postgres/*/*.sh
odoo/*/*.sh
php/*/*.sh

# VSCode
.vscode/
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ env:
- DOCKER_IMAGE_NAME="dockershelf/odoo:10.0"
- DOCKER_IMAGE_NAME="dockershelf/odoo:11.0"
- DOCKER_IMAGE_NAME="dockershelf/odoo:12.0" DOCKER_IMAGE_EXTRA_TAGS="dockershelf/odoo:latest"
- DOCKER_IMAGE_NAME="dockershelf/php:7.0"
- DOCKER_IMAGE_NAME="dockershelf/php:7.2"
- DOCKER_IMAGE_NAME="dockershelf/php:7.3" DOCKER_IMAGE_EXTRA_TAGS="dockershelf/php:latest"
install:
- gem install docker-api serverspec
before_script:
Expand Down
13 changes: 13 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Changelog


## 2.2.0 (2019-06-24)

### Changes

* Improving PHP shelves. [Luis Alejandro Martínez Faneyth]

* Adding PHP shelves. [Luis Alejandro Martínez Faneyth]

### Fix

* Fixing build. [Luis Alejandro Martínez Faneyth]


## 2.1.5 (2019-05-19)

### Changes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![](https://img.shields.io/github/release/LuisAlejandro/dockershelf.svg)](https://github.com/LuisAlejandro/dockershelf/releases) [![](https://img.shields.io/travis/LuisAlejandro/dockershelf.svg)](https://travis-ci.org/LuisAlejandro/dockershelf) [![](https://img.shields.io/github/issues-raw/LuisAlejandro/dockershelf/in%20progress.svg?label=in%20progress)](https://github.com/LuisAlejandro/dockershelf/issues?q=is%3Aissue+is%3Aopen+label%3A%22in+progress%22) [![](https://badges.gitter.im/LuisAlejandro/dockershelf.svg)](https://gitter.im/LuisAlejandro/dockershelf) [![](https://cla-assistant.io/readme/badge/LuisAlejandro/dockershelf)](https://cla-assistant.io/LuisAlejandro/dockershelf)

Current version: 2.1.5
Current version: 2.2.0

*Dockershelf* is a repository that serves as a collector for docker recipes that are universal, efficient and slim. We keep adding "shelves", which are holders for the different versions of a popular language or application.

Expand Down
11 changes: 10 additions & 1 deletion README.md.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![](https://img.shields.io/github/release/LuisAlejandro/dockershelf.svg)](https://github.com/LuisAlejandro/dockershelf/releases) [![](https://img.shields.io/travis/LuisAlejandro/dockershelf.svg)](https://travis-ci.org/LuisAlejandro/dockershelf) [![](https://img.shields.io/github/issues-raw/LuisAlejandro/dockershelf/in%20progress.svg?label=in%20progress)](https://github.com/LuisAlejandro/dockershelf/issues?q=is%3Aissue+is%3Aopen+label%3A%22in+progress%22) [![](https://badges.gitter.im/LuisAlejandro/dockershelf.svg)](https://gitter.im/LuisAlejandro/dockershelf) [![](https://cla-assistant.io/readme/badge/LuisAlejandro/dockershelf)](https://cla-assistant.io/LuisAlejandro/dockershelf)

Current version: 2.1.5
Current version: 2.2.0

*Dockershelf* is a repository that serves as a collector for docker recipes that are universal, efficient and slim. We keep adding "shelves", which are holders for the different versions of a popular language or application.

Expand Down Expand Up @@ -92,6 +92,15 @@ These images are similar to the official ones, but with some improved configurat

![](https://cdn.rawgit.com/LuisAlejandro/dockershelf/master/images/table.svg)

### PHP


|Image |Release |Dockerfile |Layers |Size |
|-------|---------|------------|--------|------|
%%PHP_TABLE%%

![](https://cdn.rawgit.com/LuisAlejandro/dockershelf/master/images/table.svg)

## How to download

Pull one of the available images and start hacking!
Expand Down
6 changes: 6 additions & 0 deletions build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ if [ "${DOCKER_IMAGE_TYPE}" == "postgres" ]; then
cp "${DOCKER_IMAGE_TYPE_DIR}/docker-entrypoint.sh" "${DOCKER_IMAGE_DIR}"
fi

# Copy entrypoint if we are building PHP
if [ "${DOCKER_IMAGE_TYPE}" == "php" ]; then
cp "${DOCKER_IMAGE_TYPE_DIR}/docker-entrypoint.sh" "${DOCKER_IMAGE_DIR}"
cp "${DOCKER_IMAGE_TYPE_DIR}/apache2-foreground" "${DOCKER_IMAGE_DIR}"
fi

# Copy latex sample if we are building Latex
if [ "${DOCKER_IMAGE_TYPE}" == "latex" ]; then
cp "${DOCKER_IMAGE_TYPE_DIR}/sample.tex" "${DOCKER_IMAGE_DIR}"
Expand Down
30 changes: 30 additions & 0 deletions php/7.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM dockershelf/debian:sid
MAINTAINER Luis Alejandro Martínez Faneyth <[email protected]>

ARG BUILD_DATE
ARG VCS_REF
ARG VERSION

LABEL org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="php7.0" \
org.label-schema.description="A PHP 7.0 image based on Debian sid." \
org.label-schema.url="https://github.com/LuisAlejandro/dockershelf" \
org.label-schema.vcs-ref=${VCS_REF} \
org.label-schema.vcs-url="https://github.com/LuisAlejandro/dockershelf" \
org.label-schema.vendor="Luis Alejandro Martínez Faneyth" \
org.label-schema.version=${VERSION} \
org.label-schema.schema-version="1.0.0-rc.1"

ENV PHP_VER_NUM="7.0" PHP_DEBIAN_SUITE="stretch"

COPY docker-entrypoint.sh apache2-foreground /usr/local/bin/
COPY build-image.sh library.sh /usr/share/dockershelf/php/
RUN bash /usr/share/dockershelf/php/build-image.sh

VOLUME /var/www/html
WORKDIR /var/www/html

EXPOSE 80

ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["apache2-foreground"]
30 changes: 30 additions & 0 deletions php/7.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM dockershelf/debian:sid
MAINTAINER Luis Alejandro Martínez Faneyth <[email protected]>

ARG BUILD_DATE
ARG VCS_REF
ARG VERSION

LABEL org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="php7.2" \
org.label-schema.description="A PHP 7.2 image based on Debian sid." \
org.label-schema.url="https://github.com/LuisAlejandro/dockershelf" \
org.label-schema.vcs-ref=${VCS_REF} \
org.label-schema.vcs-url="https://github.com/LuisAlejandro/dockershelf" \
org.label-schema.vendor="Luis Alejandro Martínez Faneyth" \
org.label-schema.version=${VERSION} \
org.label-schema.schema-version="1.0.0-rc.1"

ENV PHP_VER_NUM="7.2" PHP_DEBIAN_SUITE="sid"

COPY docker-entrypoint.sh apache2-foreground /usr/local/bin/
COPY build-image.sh library.sh /usr/share/dockershelf/php/
RUN bash /usr/share/dockershelf/php/build-image.sh

VOLUME /var/www/html
WORKDIR /var/www/html

EXPOSE 80

ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["apache2-foreground"]
30 changes: 30 additions & 0 deletions php/7.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM dockershelf/debian:sid
MAINTAINER Luis Alejandro Martínez Faneyth <[email protected]>

ARG BUILD_DATE
ARG VCS_REF
ARG VERSION

LABEL org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="php7.3" \
org.label-schema.description="A PHP 7.3 image based on Debian sid." \
org.label-schema.url="https://github.com/LuisAlejandro/dockershelf" \
org.label-schema.vcs-ref=${VCS_REF} \
org.label-schema.vcs-url="https://github.com/LuisAlejandro/dockershelf" \
org.label-schema.vendor="Luis Alejandro Martínez Faneyth" \
org.label-schema.version=${VERSION} \
org.label-schema.schema-version="1.0.0-rc.1"

ENV PHP_VER_NUM="7.3" PHP_DEBIAN_SUITE="sid"

COPY docker-entrypoint.sh apache2-foreground /usr/local/bin/
COPY build-image.sh library.sh /usr/share/dockershelf/php/
RUN bash /usr/share/dockershelf/php/build-image.sh

VOLUME /var/www/html
WORKDIR /var/www/html

EXPOSE 80

ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["apache2-foreground"]
30 changes: 30 additions & 0 deletions php/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM %%BASE_IMAGE%%
MAINTAINER Luis Alejandro Martínez Faneyth <[email protected]>

ARG BUILD_DATE
ARG VCS_REF
ARG VERSION

LABEL org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="php%%PHP_VERSION%%" \
org.label-schema.description="A PHP %%PHP_VERSION%% image based on Debian %%DEBIAN_RELEASE%%." \
org.label-schema.url="https://github.com/LuisAlejandro/dockershelf" \
org.label-schema.vcs-ref=${VCS_REF} \
org.label-schema.vcs-url="https://github.com/LuisAlejandro/dockershelf" \
org.label-schema.vendor="Luis Alejandro Martínez Faneyth" \
org.label-schema.version=${VERSION} \
org.label-schema.schema-version="1.0.0-rc.1"

ENV PHP_VER_NUM="%%PHP_VERSION%%" PHP_DEBIAN_SUITE="%%PHP_DEBIAN_SUITE%%"

COPY docker-entrypoint.sh apache2-foreground /usr/local/bin/
COPY build-image.sh library.sh /usr/share/dockershelf/php/
RUN bash /usr/share/dockershelf/php/build-image.sh

VOLUME /var/www/html
WORKDIR /var/www/html

EXPOSE 80

ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["apache2-foreground"]
41 changes: 41 additions & 0 deletions php/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
![](https://cdn.rawgit.com/LuisAlejandro/dockershelf/master/images/banner.svg)

---

[![](https://img.shields.io/github/release/LuisAlejandro/dockershelf.svg)](https://github.com/LuisAlejandro/dockershelf/releases) [![](https://img.shields.io/travis/LuisAlejandro/dockershelf.svg)](https://travis-ci.org/LuisAlejandro/dockershelf) [![](https://img.shields.io/docker/pulls/dockershelf/php.svg)](https://hub.docker.com/r/dockershelf/php) [![](https://img.shields.io/github/issues-raw/LuisAlejandro/dockershelf/in%20progress.svg?label=in%20progress)](https://github.com/LuisAlejandro/dockershelf/issues?q=is%3Aissue+is%3Aopen+label%3A%22in+progress%22) [![](https://badges.gitter.im/LuisAlejandro/dockershelf.svg)](https://gitter.im/LuisAlejandro/dockershelf) [![](https://cla-assistant.io/readme/badge/LuisAlejandro/dockershelf)](https://cla-assistant.io/LuisAlejandro/dockershelf)

## PHP shelf

|Image |Release |Dockerfile |Layers |Size |
|-------|---------|------------|--------|------|
|[`dockershelf/php:7.0`](https://hub.docker.com/r/dockershelf/php)|`7.0`|[![](https://img.shields.io/badge/-php%2F7.0%2FDockerfile-blue.svg?colorA=22313f&colorB=4a637b&maxAge=86400&logo=docker)](https://github.com/LuisAlejandro/dockershelf/blob/master/php/7.0/Dockerfile)|[![](https://img.shields.io/microbadger/layers/dockershelf/php/7.0.svg?colorA=22313f&colorB=4a637b&maxAge=86400)](https://microbadger.com/images/dockershelf/php:7.0)|[![](https://img.shields.io/microbadger/image-size/dockershelf/php/7.0.svg?colorA=22313f&colorB=4a637b&maxAge=86400)](https://microbadger.com/images/dockershelf/php:7.0)|
|[`dockershelf/php:7.2`](https://hub.docker.com/r/dockershelf/php)|`7.2`|[![](https://img.shields.io/badge/-php%2F7.2%2FDockerfile-blue.svg?colorA=22313f&colorB=4a637b&maxAge=86400&logo=docker)](https://github.com/LuisAlejandro/dockershelf/blob/master/php/7.2/Dockerfile)|[![](https://img.shields.io/microbadger/layers/dockershelf/php/7.2.svg?colorA=22313f&colorB=4a637b&maxAge=86400)](https://microbadger.com/images/dockershelf/php:7.2)|[![](https://img.shields.io/microbadger/image-size/dockershelf/php/7.2.svg?colorA=22313f&colorB=4a637b&maxAge=86400)](https://microbadger.com/images/dockershelf/php:7.2)|
|[`dockershelf/php:7.3`](https://hub.docker.com/r/dockershelf/php)|`7.3`|[![](https://img.shields.io/badge/-php%2F7.3%2FDockerfile-blue.svg?colorA=22313f&colorB=4a637b&maxAge=86400&logo=docker)](https://github.com/LuisAlejandro/dockershelf/blob/master/php/7.3/Dockerfile)|[![](https://img.shields.io/microbadger/layers/dockershelf/php/7.3.svg?colorA=22313f&colorB=4a637b&maxAge=86400)](https://microbadger.com/images/dockershelf/php:7.3)|[![](https://img.shields.io/microbadger/image-size/dockershelf/php/7.3.svg?colorA=22313f&colorB=4a637b&maxAge=86400)](https://microbadger.com/images/dockershelf/php:7.3)|

![](https://cdn.rawgit.com/LuisAlejandro/dockershelf/master/images/table.svg)

## Building process

The PHP images are built using a bash script [`php/build-image.sh`](https://github.com/LuisAlejandro/dockershelf/blob/master/php/build-image.sh), you can check it out for details.

Each php release is downloaded and installed from the debian official repositories. Some releases are not compiled against Debian Sid libraries, so some potentially old libraries could be installed in the process.

We'll explain the overall process here:

1. Built `FROM dockershelf/debian:sid`.
2. Labelled according to [label-schema.org](http://label-schema.org).
3. Install developer tools to handle the package installation.
4. Install PHP.
5. Uninstall developer tools and orphan packages.
6. Install `pip`.
7. Shrink image by deleting unnecessary files.

## Made with :heart: and :hamburger:

![Banner](http://huntingbears.com.ve/static/img/site/banner.svg)

My name is Luis ([@LuisAlejandro](https://github.com/LuisAlejandro)) and I'm a Free and Open-Source Software developer living in Maracay, Venezuela.

If you like what I do, please support me on [Patreon](https://www.patreon.com/luisalejandro), [Flattr](https://flattr.com/profile/luisalejandro), or donate via [PayPal](https://www.paypal.me/martinezfaneyth), so that I can continue doing what I love.

> Blog [luisalejandro.org](http://luisalejandro.org) · GitHub [@LuisAlejandro](https://github.com/LuisAlejandro) · Twitter [@LuisAlejandro](https://twitter.com/LuisAlejandro)
39 changes: 39 additions & 0 deletions php/README.md.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
![](https://cdn.rawgit.com/LuisAlejandro/dockershelf/master/images/banner.svg)

---

[![](https://img.shields.io/github/release/LuisAlejandro/dockershelf.svg)](https://github.com/LuisAlejandro/dockershelf/releases) [![](https://img.shields.io/travis/LuisAlejandro/dockershelf.svg)](https://travis-ci.org/LuisAlejandro/dockershelf) [![](https://img.shields.io/docker/pulls/dockershelf/php.svg)](https://hub.docker.com/r/dockershelf/php) [![](https://img.shields.io/github/issues-raw/LuisAlejandro/dockershelf/in%20progress.svg?label=in%20progress)](https://github.com/LuisAlejandro/dockershelf/issues?q=is%3Aissue+is%3Aopen+label%3A%22in+progress%22) [![](https://badges.gitter.im/LuisAlejandro/dockershelf.svg)](https://gitter.im/LuisAlejandro/dockershelf) [![](https://cla-assistant.io/readme/badge/LuisAlejandro/dockershelf)](https://cla-assistant.io/LuisAlejandro/dockershelf)

## PHP shelf

|Image |Release |Dockerfile |Layers |Size |
|-------|---------|------------|--------|------|
%%PHP_TABLE%%

![](https://cdn.rawgit.com/LuisAlejandro/dockershelf/master/images/table.svg)

## Building process

The PHP images are built using a bash script [`php/build-image.sh`](https://github.com/LuisAlejandro/dockershelf/blob/master/php/build-image.sh), you can check it out for details.

Each php release is downloaded and installed from the debian official repositories. Some releases are not compiled against Debian Sid libraries, so some potentially old libraries could be installed in the process.

We'll explain the overall process here:

1. Built `FROM dockershelf/debian:sid`.
2. Labelled according to [label-schema.org](http://label-schema.org).
3. Install developer tools to handle the package installation.
4. Install PHP.
5. Uninstall developer tools and orphan packages.
6. Install `pip`.
7. Shrink image by deleting unnecessary files.

## Made with :heart: and :hamburger:

![Banner](http://huntingbears.com.ve/static/img/site/banner.svg)

My name is Luis ([@LuisAlejandro](https://github.com/LuisAlejandro)) and I'm a Free and Open-Source Software developer living in Maracay, Venezuela.

If you like what I do, please support me on [Patreon](https://www.patreon.com/luisalejandro), [Flattr](https://flattr.com/profile/luisalejandro), or donate via [PayPal](https://www.paypal.me/martinezfaneyth), so that I can continue doing what I love.

> Blog [luisalejandro.org](http://luisalejandro.org) · GitHub [@LuisAlejandro](https://github.com/LuisAlejandro) · Twitter [@LuisAlejandro](https://twitter.com/LuisAlejandro)
40 changes: 40 additions & 0 deletions php/apache2-foreground
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
set -e

# Note: we don't just use "apache2ctl" here because it itself is just a shell-script wrapper around apache2 which provides extra functionality like "apache2ctl start" for launching apache2 in the background.
# (also, when run as "apache2ctl <apache args>", it does not use "exec", which leaves an undesirable resident shell process)

: "${APACHE_CONFDIR:=/etc/apache2}"
: "${APACHE_ENVVARS:=$APACHE_CONFDIR/envvars}"
if test -f "$APACHE_ENVVARS"; then
. "$APACHE_ENVVARS"
fi

# Apache gets grumpy about PID files pre-existing
: "${APACHE_RUN_DIR:=/var/run/apache2}"
: "${APACHE_PID_FILE:=$APACHE_RUN_DIR/apache2.pid}"
rm -f "$APACHE_PID_FILE"

# create missing directories
# (especially APACHE_RUN_DIR, APACHE_LOCK_DIR, and APACHE_LOG_DIR)
for e in "${!APACHE_@}"; do
if [[ "$e" == *_DIR ]] && [[ "${!e}" == /* ]]; then
# handle "/var/lock" being a symlink to "/run/lock", but "/run/lock" not existing beforehand, so "/var/lock/something" fails to mkdir
# mkdir: cannot create directory '/var/lock': File exists
dir="${!e}"
while [ "$dir" != "$(dirname "$dir")" ]; do
dir="$(dirname "$dir")"
if [ -d "$dir" ]; then
break
fi
absDir="$(readlink -f "$dir" 2>/dev/null || :)"
if [ -n "$absDir" ]; then
mkdir -p "$absDir"
fi
done

mkdir -p "${!e}"
fi
done

exec apache2 -DFOREGROUND "$@"
Loading

0 comments on commit 4f02f7b

Please sign in to comment.