Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 42d56cb

Browse files
authored
Merge pull request #241 from jdeathe/centos-6-develop
Release changes for 1.10.0
2 parents 2b9500e + cf7a5eb commit 42d56cb

27 files changed

+2843
-968
lines changed

.dockerignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
.env
2+
.env.example
13
.git
24
.gitignore
35
dist
6+
images
47
test
8+
docker-compose.yml
59
LICENSE
610
README-short.txt
711
*.md

.env.example

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
MYSQL_ROOT_PASSWORD=
2+
MYSQL_ROOT_PASSWORD_HASHED=false
3+
MYSQL_SUBNET=127.0.0.1
4+
MYSQL_USER=
5+
MYSQL_USER_DATABASE=
6+
MYSQL_USER_PASSWORD=
7+
MYSQL_USER_PASSWORD_HASHED=false

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
.env
12
packages
23
dist

CHANGELOG.md

+29
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,35 @@ Summary of release changes for Version 1.
66

77
CentOS-6 6.10 x86_64 - MySQL 5.1.
88

9+
### 1.10.0 - 2019-03-18
10+
11+
- Updates source image to [1.10.1](https://github.com/jdeathe/centos-ssh/releases/tag/1.10.1).
12+
- Updates and restructures Dockerfile.
13+
- Updates container naming conventions and readability of `Makefile`.
14+
- Updates Dockerfile with combined ADD to reduce layer count in final image.
15+
- Fixes issue with unexpected published port in run templates when `DOCKER_PORT_MAP_TCP_3306` is set to an empty string or 0.
16+
- Fixes binary paths in systemd unit files for compatibility with both EL and Ubuntu hosts.
17+
- Adds placeholder replacement of `RELEASE_VERSION` docker argument to systemd service unit template.
18+
- Adds consideration for event lag into test cases for unhealthy health_status events.
19+
- Adds port incrementation to Makefile's run template for container names with an instance suffix.
20+
- Adds supervisord check to healthcheck script and removes unnecessary source script.
21+
- Adds images directory `.dockerignore` to reduce size of build context.
22+
- Adds docker-compose configuration example.
23+
- Adds improved logging output.
24+
- Adds improved root password configuration.
25+
- Adds improvement to pull logic in systemd unit install template.
26+
- Adds `SSH_AUTOSTART_SUPERVISOR_STDOUT` with a value "false", disabling startup of `supervisor_stdout`.
27+
- Adds improved `healtchcheck`, `sshd-bootstrap` and `sshd-wrapper` scripts.
28+
- Adds `MYSQL_INIT_LIMIT` with a default value of "60" seconds.
29+
- Adds `MYSQL_INIT_SQL` with a default empty value "".
30+
- Deprecates `CUSTOM_MYSQL_INIT_SQL`, use `MYSQL_INIT_SQL` instead.
31+
- Removes use of `/etc/services-config` paths.
32+
- Removes use of `/etc/mysqld-bootstrap.conf`.
33+
- Removes X-Fleet section from etcd register template unit-file.
34+
- Removes the unused group element from the default container name.
35+
- Removes the node element from the default container name.
36+
- Removes unused environment variables from Makefile and scmi configuration.
37+
938
### 1.9.1 - 2018-11-18
1039

1140
- Updates source image to [1.9.1](https://github.com/jdeathe/centos-ssh/releases/tag/1.9.1).

Dockerfile

+34-48
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,65 @@
1-
# =============================================================================
2-
# jdeathe/centos-ssh-mysql
3-
#
4-
# CentOS-6, MySQL 5.1
5-
#
6-
# =============================================================================
7-
FROM jdeathe/centos-ssh:1.9.1
1+
FROM jdeathe/centos-ssh:1.10.1
82

9-
# -----------------------------------------------------------------------------
10-
# Install MySQL
11-
# -----------------------------------------------------------------------------
3+
ARG RELEASE_VERSION="1.10.0"
4+
5+
# ------------------------------------------------------------------------------
6+
# Base install of required packages
7+
# ------------------------------------------------------------------------------
128
RUN rpm --rebuilddb \
139
&& yum -y install \
1410
--setopt=tsflags=nodocs \
1511
--disableplugin=fastestmirror \
12+
mysql-5.1.73-8.el6_8 \
13+
mysql-libs-5.1.73-8.el6_8 \
1614
mysql-server-5.1.73-8.el6_8 \
1715
&& yum versionlock add \
1816
mysql* \
1917
&& rm -rf /var/cache/yum/* \
2018
&& yum clean all
2119

22-
# -----------------------------------------------------------------------------
20+
# ------------------------------------------------------------------------------
2321
# Copy files into place
24-
# -----------------------------------------------------------------------------
25-
ADD src/usr/bin \
26-
/usr/bin/
27-
ADD src/usr/sbin \
28-
/usr/sbin/
29-
ADD src/opt/scmi \
30-
/opt/scmi/
31-
ADD src/etc/systemd/system \
32-
/etc/systemd/system/
33-
ADD src/etc/services-config/mysql/my.cnf \
34-
src/etc/services-config/mysql/mysqld-bootstrap.conf \
35-
/etc/services-config/mysql/
36-
ADD src/etc/services-config/supervisor/supervisord.d \
37-
/etc/services-config/supervisor/supervisord.d/
22+
# ------------------------------------------------------------------------------
23+
ADD src /
3824

39-
RUN ln -sf \
40-
/etc/services-config/mysql/my.cnf \
41-
/etc/my.cnf \
42-
&& ln -sf \
43-
/etc/services-config/mysql/mysqld-bootstrap.conf \
44-
/etc/mysqld-bootstrap.conf \
45-
&& ln -sf \
46-
/etc/services-config/supervisor/supervisord.d/mysqld-bootstrap.conf \
47-
/etc/supervisord.d/mysqld-bootstrap.conf \
48-
&& ln -sf \
49-
/etc/services-config/supervisor/supervisord.d/mysqld-wrapper.conf \
50-
/etc/supervisord.d/mysqld-wrapper.conf \
25+
# ------------------------------------------------------------------------------
26+
# Provisioning
27+
# - Replace placeholders with values in systemd service unit template
28+
# - Set permissions
29+
# ------------------------------------------------------------------------------
30+
RUN sed -i \
31+
-e "s~{{RELEASE_VERSION}}~${RELEASE_VERSION}~g" \
32+
/etc/systemd/system/centos-ssh-mysql@.service \
5133
&& chmod 600 \
52-
/etc/services-config/mysql/{my.cnf,mysqld-bootstrap.conf} \
34+
/etc/my.cnf \
35+
&& chmod 644 \
36+
/etc/supervisord.d/mysqld-{bootstrap,wrapper}.conf \
5337
&& chmod 700 \
5438
/usr/{bin/healthcheck,sbin/mysqld-{bootstrap,wrapper}}
5539

5640
EXPOSE 3306
5741

58-
# -----------------------------------------------------------------------------
42+
# ------------------------------------------------------------------------------
5943
# Set default environment variables
60-
# -----------------------------------------------------------------------------
61-
ENV MYSQL_AUTOSTART_MYSQLD_BOOTSTRAP=true \
62-
MYSQL_AUTOSTART_MYSQLD_WRAPPER=true \
44+
# ------------------------------------------------------------------------------
45+
ENV MYSQL_AUTOSTART_MYSQLD_BOOTSTRAP="true" \
46+
MYSQL_AUTOSTART_MYSQLD_WRAPPER="true" \
47+
MYSQL_INIT_LIMIT="60" \
48+
MYSQL_INIT_SQL="" \
6349
MYSQL_ROOT_PASSWORD="" \
64-
MYSQL_ROOT_PASSWORD_HASHED=false \
50+
MYSQL_ROOT_PASSWORD_HASHED="false" \
6551
MYSQL_SUBNET="127.0.0.1" \
6652
MYSQL_USER="" \
6753
MYSQL_USER_DATABASE="" \
6854
MYSQL_USER_PASSWORD="" \
69-
MYSQL_USER_PASSWORD_HASHED=false \
70-
SSH_AUTOSTART_SSHD=false \
71-
SSH_AUTOSTART_SSHD_BOOTSTRAP=false
55+
MYSQL_USER_PASSWORD_HASHED="false" \
56+
SSH_AUTOSTART_SSHD="false" \
57+
SSH_AUTOSTART_SSHD_BOOTSTRAP="false" \
58+
SSH_AUTOSTART_SUPERVISOR_STDOUT="false"
7259

7360
# -----------------------------------------------------------------------------
7461
# Set image metadata
7562
# -----------------------------------------------------------------------------
76-
ARG RELEASE_VERSION="1.9.1"
7763
LABEL \
7864
maintainer="James Deathe <james.deathe@gmail.com>" \
7965
install="docker run \
@@ -110,4 +96,4 @@ HEALTHCHECK \
11096
--retries=10 \
11197
CMD ["/usr/bin/healthcheck"]
11298

113-
CMD ["/usr/bin/supervisord", "--configuration=/etc/supervisord.conf"]
99+
CMD ["/usr/bin/supervisord", "--configuration=/etc/supervisord.conf"]

0 commit comments

Comments
 (0)