Skip to content

Commit

Permalink
better labels for containers and names for images
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Dec 5, 2020
1 parent b689349 commit bfdd3c1
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 9 deletions.
2 changes: 0 additions & 2 deletions bin/setup/vendor-symlink.sh

This file was deleted.

4 changes: 3 additions & 1 deletion docker/docker-compose-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ version: '3'
services:

mysql:
image: ${TESTSTACK_PROJECT_NAME:-euts}_mysql
build:
context: images/mysql
args:
timezone: ${TESTSTACK_TZ:-none}
do_update_os: ${TESTSTACK_UPDATE_OS_ON_BUILD:-true}
# note: Travis Xenial and Bionic images come with mysql 5.7 by default; Focal comes with mysql 8.0
# But mysql 5.6 is not recommended for EZP 5.4, so we default to 5.6
mysql_version: ${MYSQL_VERSION:-5.6}
project_name: ${TESTSTACK_PROJECT_NAME:-euts}
timezone: ${TESTSTACK_TZ:-none}
hostname: mysql
container_name: ${TESTSTACK_PROJECT_NAME:-euts}_mysql
environment:
Expand Down
4 changes: 3 additions & 1 deletion docker/docker-compose-postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ version: '3'
services:

postgresql:
image: ${TESTSTACK_PROJECT_NAME:-euts}_postgresql
build:
context: images/postgresql
args:
timezone: ${TESTSTACK_TZ:-none}
do_update_os: ${TESTSTACK_UPDATE_OS_ON_BUILD:-true}
# note: Travis Xenial images come with PG 9.4-9.6,10; Bionic with 9.3-9.6,10,11 and Focal with 12
# We go with 9.5 as default because it is the lowest upstream supported version as of 11/2020...
postgresql_version: ${POSTGRESQL_VERSION:-9.5}
project_name: ${TESTSTACK_PROJECT_NAME:-euts}
timezone: ${TESTSTACK_TZ:-none}
hostname: postgresql
container_name: ${TESTSTACK_PROJECT_NAME:-euts}_postgresql
environment:
Expand Down
4 changes: 3 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ version: '3'
services:

ez:
image: ${TESTSTACK_PROJECT_NAME:-euts}_ez
build:
context: images/ez
args:
debian_mirror: ${TESTSTACK_DEBIAN_MIRROR:-none}
debian_version: ${TESTSTACK_DEBIAN_VERSION:-buster}
do_update_os: ${TESTSTACK_UPDATE_OS_ON_BUILD:-true}
php_version: ${TESTSTACK_PHP_VERSION:-default}
project_name: ${TESTSTACK_PROJECT_NAME:-euts}
timezone: ${TESTSTACK_TZ:-none}
do_update_os: ${TESTSTACK_UPDATE_OS_ON_BUILD:-true}
hostname: ez
container_name: ${TESTSTACK_PROJECT_NAME:-euts}_ez
environment:
Expand Down
11 changes: 7 additions & 4 deletions docker/images/ez/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
ARG debian_version=buster

FROM debian:${debian_version}-slim
LABEL php_version.version=${php_version}
LABEL com.tanoconsulting.euts.project_name=${project_name}

ARG debian_mirror=none
ARG debian_version=buster
ARG php_version=default
ARG do_shrink_container=true
ARG do_update_os=true
ARG php_version=default
ARG project_name=euts
ARG timezone=none

# Set up debian mirror
Expand Down Expand Up @@ -42,10 +46,9 @@ RUN apt-get remove -y composer || echo An error on the line above is ok; \
# -----------------------------------------------------------------------------
RUN /root/build/createuser.sh

# Clear archives in apt cache folder to slim down the image
# -----------------------------------------------------------------------------

# Shrink image: clear archives in apt cache folder
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
RUN if [ "${do_shrink_container}" != "false" ]; then apt-get clean && rm -rf /var/lib/apt/lists/*; fi

# @todo should we move these two commands to the top of the dockerfile to increase layer shareability ?
COPY root/boot/*.sh /root/boot/
Expand Down
2 changes: 2 additions & 0 deletions docker/images/mysql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ ARG mysql_version=5.6

FROM mysql:${mysql_version}
LABEL mysql.version=${mysql_version}
LABEL com.tanoconsulting.euts.project_name=${project_name}

ARG do_shrink_container=true
ARG do_update_os=true
ARG project_name=euts
ARG timezone=none

# Configure timezone
Expand Down
2 changes: 2 additions & 0 deletions docker/images/postgresql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ ARG postgresql_version=9.5

FROM postgres:${postgresql_version}
LABEL postgresql.version=${postgresql_version}
LABEL com.tanoconsulting.euts.project_name=${project_name}

ARG do_shrink_container=true
ARG do_update_os=true
ARG project_name=euts
ARG timezone=none

# Configure timezone
Expand Down

0 comments on commit bfdd3c1

Please sign in to comment.