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

Commit

Permalink
Merge pull request #542 from jdeathe/centos-7-develop
Browse files Browse the repository at this point in the history
Release changes for 2.3.0
  • Loading branch information
jdeathe authored Oct 6, 2017
2 parents 26c05f4 + f55f172 commit 0b402b4
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 42 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

Summary of release changes for Version 2 - CentOS-7

### 2.3.0 - 2017-10-06

- Updates source tag to CentOS 7.4.1708.

### 2.2.4 - 2017-09-13

- Updates [supervisor](http://supervisord.org/changes.html) to version 3.3.3.
Expand Down
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# =============================================================================
# jdeathe/centos-ssh
#
# CentOS-7 7.3.1611 x86_64 - SCL/EPEL/IUS Repos. / Supervisor / OpenSSH.
# CentOS-7 7.4.1708 x86_64 - SCL/EPEL/IUS Repos. / Supervisor / OpenSSH.
#
# =============================================================================
FROM centos:7.3.1611
FROM centos:7.4.1708

# -----------------------------------------------------------------------------
# Base Install + Import the RPM GPG keys for Repositories
Expand All @@ -23,14 +23,14 @@ RUN rpm --rebuilddb \
centos-release-scl-rh \
epel-release \
https://centos7.iuscommunity.org/ius-release.rpm \
openssh-6.6.1p1-35.el7_3 \
openssh-server-6.6.1p1-35.el7_3 \
openssh-clients-6.6.1p1-35.el7_3 \
openssl-1.0.1e-60.el7 \
python-setuptools-0.9.8-4.el7 \
sudo-1.8.6p7-23.el7_3 \
vim-minimal-7.4.160-1.el7_3.1 \
yum-plugin-versionlock-1.1.31-40.el7 \
openssh-7.4p1-12.el7_4 \
openssh-server-7.4p1-12.el7_4 \
openssh-clients-7.4p1-12.el7_4 \
openssl-1.0.2k-8.el7 \
python-setuptools-0.9.8-7.el7 \
sudo-1.8.19p2-11.el7_4 \
vim-minimal-7.4.160-2.el7 \
yum-plugin-versionlock-1.1.31-42.el7 \
xz-5.2.2-1.el7 \
&& yum versionlock add \
openssh \
Expand Down Expand Up @@ -154,7 +154,7 @@ ENV SSH_AUTHORIZED_KEYS="" \
# -----------------------------------------------------------------------------
# Set image metadata
# -----------------------------------------------------------------------------
ARG RELEASE_VERSION="2.2.4"
ARG RELEASE_VERSION="2.3.0"
LABEL \
maintainer="James Deathe <[email protected]>" \
install="docker run \
Expand Down Expand Up @@ -183,7 +183,7 @@ jdeathe/centos-ssh:${RELEASE_VERSION} \
org.deathe.license="MIT" \
org.deathe.vendor="jdeathe" \
org.deathe.url="https://github.com/jdeathe/centos-ssh" \
org.deathe.description="CentOS-7 7.3.1611 x86_64 - SCL, EPEL and IUS Repositories / Supervisor / OpenSSH."
org.deathe.description="CentOS-7 7.4.1708 x86_64 - SCL, EPEL and IUS Repositories / Supervisor / OpenSSH."

HEALTHCHECK \
--interval=0.5s \
Expand Down
2 changes: 1 addition & 1 deletion README-short.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CentOS-6 6.9 x86_64 / CentOS-7 7.3.1611 x86_64 - SCL/EPEL/IUS Repos / Supervisor / OpenSSH.
CentOS-6 6.9 x86_64 / CentOS-7 7.4.1708 x86_64 - SCL/EPEL/IUS Repos / Supervisor / OpenSSH.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
centos-ssh
==========

Docker Images of CentOS-6 6.9 x86_64 / CentOS-7 7.3.1611 x86_64
Docker Images of CentOS-6 6.9 x86_64 / CentOS-7 7.4.1708 x86_64

Includes public key authentication, Automated password generation and supports custom configuration via environment variables.

## Overview & links

The latest CentOS-6 / CentOS-7 based releases can be pulled from the `centos-6` / `centos-7` Docker tags respectively. For production use it is recommended to select a specific release tag - the convention is `centos-6-1.8.2` OR `1.8.2` for the [1.8.2](https://github.com/jdeathe/centos-ssh/tree/1.8.2) release tag and `centos-7-2.2.4` OR `2.2.4` for the [2.2.4](https://github.com/jdeathe/centos-ssh/tree/2.2.4) release tag.
The latest CentOS-6 / CentOS-7 based releases can be pulled from the `centos-6` / `centos-7` Docker tags respectively. For production use it is recommended to select a specific release tag - the convention is `centos-6-1.8.2` OR `1.8.2` for the [1.8.2](https://github.com/jdeathe/centos-ssh/tree/1.8.2) release tag and `centos-7-2.3.0` OR `2.3.0` for the [2.3.0](https://github.com/jdeathe/centos-ssh/tree/2.3.0) release tag.

### Tags and respective `Dockerfile` links

- `centos-7`,`centos-7-2.2.4`,`2.2.4` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh/blob/centos-7/Dockerfile)
- `centos-7`,`centos-7-2.3.0`,`2.3.0` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh/blob/centos-7/Dockerfile)
- `centos-6`,`centos-6-1.8.2`,`1.8.2` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh/blob/centos-6/Dockerfile)

The Dockerfile can be used to build a base image that is the bases for several other docker images.
Expand Down Expand Up @@ -105,10 +105,10 @@ $ docker run \
--rm \
--privileged \
--volume /:/media/root \
jdeathe/centos-ssh:2.2.4 \
jdeathe/centos-ssh:2.3.0 \
/usr/sbin/scmi install \
--chroot=/media/root \
--tag=2.2.4 \
--tag=2.3.0 \
--name=ssh.pool-1.1.1 \
--setopt="--volume {{NAME}}.config-ssh:/etc/ssh"
```
Expand All @@ -122,10 +122,10 @@ $ docker run \
--rm \
--privileged \
--volume /:/media/root \
jdeathe/centos-ssh:2.2.4 \
jdeathe/centos-ssh:2.3.0 \
/usr/sbin/scmi uninstall \
--chroot=/media/root \
--tag=2.2.4 \
--tag=2.3.0 \
--name=ssh.pool-1.1.1 \
--setopt="--volume {{NAME}}.config-ssh:/etc/ssh"
```
Expand All @@ -139,10 +139,10 @@ $ docker run \
--rm \
--privileged \
--volume /:/media/root \
jdeathe/centos-ssh:2.2.4 \
jdeathe/centos-ssh:2.3.0 \
/usr/sbin/scmi install \
--chroot=/media/root \
--tag=2.2.4 \
--tag=2.3.0 \
--name=ssh.pool-1.1.1 \
--manager=systemd \
--register \
Expand All @@ -162,7 +162,7 @@ Since release tags `1.7.2` / `2.1.2` the install template has been added to the
_NOTE:_ A prerequisite of the following examples is that the image has been pulled (or loaded from the release package).

```
$ docker pull jdeathe/centos-ssh:2.2.4
$ docker pull jdeathe/centos-ssh:2.3.0
```

To see detailed information about the image run `scmi` with the `--info` option. To see all available `scmi` options run with the `--help` option.
Expand All @@ -171,7 +171,7 @@ To see detailed information about the image run `scmi` with the `--info` option.
$ eval "sudo -E $(
docker inspect \
-f "{{.ContainerConfig.Labels.install}}" \
jdeathe/centos-ssh:2.2.4
jdeathe/centos-ssh:2.3.0
) --info"
```

Expand All @@ -181,7 +181,7 @@ To perform an installation using the docker name `ssh.pool-1.2.1` simply use the
$ eval "sudo -E $(
docker inspect \
-f "{{.ContainerConfig.Labels.install}}" \
jdeathe/centos-ssh:2.2.4
jdeathe/centos-ssh:2.3.0
) --name=ssh.pool-1.2.1"
```

Expand All @@ -191,7 +191,7 @@ To uninstall use the *same command* that was used to install but with the `unins
$ eval "sudo -E $(
docker inspect \
-f "{{.ContainerConfig.Labels.uninstall}}" \
jdeathe/centos-ssh:2.2.4
jdeathe/centos-ssh:2.3.0
) --name=ssh.pool-1.2.1"
```

Expand All @@ -204,7 +204,7 @@ To see detailed information about the image run `scmi` with the `--info` option.
```
$ sudo -E atomic install \
-n ssh.pool-1.3.1 \
jdeathe/centos-ssh:2.2.4 \
jdeathe/centos-ssh:2.3.0 \
--info
```

Expand All @@ -213,14 +213,14 @@ To perform an installation using the docker name `ssh.pool-1.3.1` simply use the
```
$ sudo -E atomic install \
-n ssh.pool-1.3.1 \
jdeathe/centos-ssh:2.2.4
jdeathe/centos-ssh:2.3.0
```

Alternatively, you could use the `scmi` options `--name` or `-n` for naming the container.

```
$ sudo -E atomic install \
jdeathe/centos-ssh:2.2.4 \
jdeathe/centos-ssh:2.3.0 \
--name ssh.pool-1.3.1
```

Expand All @@ -229,7 +229,7 @@ To uninstall use the *same command* that was used to install but with the `unins
```
$ sudo -E atomic uninstall \
-n ssh.pool-1.3.1 \
jdeathe/centos-ssh:2.2.4
jdeathe/centos-ssh:2.3.0
```

#### Using environment variables
Expand Down
2 changes: 1 addition & 1 deletion src/etc/systemd/system/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Environment="DOCKER_USER=jdeathe"
Environment="DOCKER_IMAGE_NAME=centos-ssh"
Environment="DOCKER_CONTAINER_OPTS="
Environment="DOCKER_IMAGE_PACKAGE_PATH=/var/opt/scmi/packages"
Environment="DOCKER_IMAGE_TAG=2.2.4"
Environment="DOCKER_IMAGE_TAG=2.3.0"
Environment="DOCKER_PORT_MAP_TCP_22=2020"
Environment="SSH_AUTHORIZED_KEYS="
Environment="SSH_AUTOSTART_SSHD=true"
Expand Down
6 changes: 5 additions & 1 deletion src/usr/sbin/sshd-bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,11 @@ function get_ssh_key_fingerprint ()
echo "${SSH_KEY}" > "${SSH_KEY_FILE}"

FINGERPRINT="$(
ssh-keygen -lf "${SSH_KEY_FILE}"
ssh-keygen \
-l \
-E md5 \
-f "${SSH_KEY_FILE}" \
| sed 's~MD5:~~'
)"

rm -f "${SSH_KEY_FILE}"
Expand Down
11 changes: 1 addition & 10 deletions test/shpec/operation_shpec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1087,16 +1087,7 @@ function test_custom_ssh_configuration ()
jdeathe/centos-ssh:latest \
&> /dev/null

if ! __is_container_ready \
ssh.pool-1.1.1 \
${STARTUP_TIME} \
"/usr/sbin/sshd " \
"grep \
'^Server listening on 0\.0\.0\.0 port 22\.' \
/var/log/secure"
then
exit 1
fi
sleep ${STARTUP_TIME}

it "Can disable sshd-bootstrap."
docker logs ssh.pool-1.1.1 \
Expand Down

0 comments on commit 0b402b4

Please sign in to comment.