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 #498 from jdeathe/centos-7-develop
Browse files Browse the repository at this point in the history
Release changes for 2.2.2
  • Loading branch information
jdeathe authored May 24, 2017
2 parents 49c25d3 + 3532ac1 commit a8d9468
Show file tree
Hide file tree
Showing 23 changed files with 360 additions and 150 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

Summary of release changes for Version 2 - CentOS-7

### 2.2.2 - 2017-05-24

- Updates `openssh` package 6.6.1p1-35.el7_3.
- Replaces deprecated Dockerfile `MAINTAINER` with a `LABEL`.
- Adds a `src` directory for the image root files.
- Adds wrapper functions to functional test cases.
- Adds `STARTUP_TIME` variable for the `logs-delayed` Makefile target.

### 2.2.1 - 2017-02-21

- Updates `vim` and `openssh` packages and the `epel-release`.
Expand Down
43 changes: 22 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
# =============================================================================
FROM centos:7.3.1611

MAINTAINER James Deathe <[email protected]>

# -----------------------------------------------------------------------------
# Base Install + Import the RPM GPG keys for Repositories
# -----------------------------------------------------------------------------
Expand All @@ -19,28 +17,30 @@ RUN rpm --rebuilddb \
&& rpm --import \
https://dl.iuscommunity.org/pub/ius/IUS-COMMUNITY-GPG-KEY \
&& yum -y install \
--setopt=tsflags=nodocs \
--disableplugin=fastestmirror \
centos-release-scl \
centos-release-scl-rh \
epel-release \
https://centos7.iuscommunity.org/ius-release.rpm \
vim-minimal-7.4.160-1.el7_3.1 \
xz-5.2.2-1.el7 \
sudo-1.8.6p7-21.el7_3 \
openssh-6.6.1p1-33.el7_3 \
openssh-server-6.6.1p1-33.el7_3 \
openssh-clients-6.6.1p1-33.el7_3 \
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-21.el7_3 \
vim-minimal-7.4.160-1.el7_3.1 \
yum-plugin-versionlock-1.1.31-40.el7 \
openssl-1.0.1e-60.el7 \
xz-5.2.2-1.el7 \
&& yum versionlock add \
vim-minimal \
xz \
sudo \
openssh \
openssh-server \
openssh-clients \
python-setuptools \
sudo \
vim-minimal \
yum-plugin-versionlock \
xz \
&& yum clean all \
&& rm -rf /etc/ld.so.cache \
&& rm -rf /sbin/sln \
Expand Down Expand Up @@ -89,19 +89,19 @@ RUN sed -i \
# -----------------------------------------------------------------------------
# Copy files into place
# -----------------------------------------------------------------------------
ADD usr/sbin \
ADD src/usr/sbin \
/usr/sbin/
ADD opt/scmi \
ADD src/opt/scmi \
/opt/scmi/
ADD etc/systemd/system \
ADD src/etc/systemd/system \
/etc/systemd/system/
ADD etc/services-config/ssh/authorized_keys \
etc/services-config/ssh/sshd-bootstrap.conf \
etc/services-config/ssh/sshd-bootstrap.env \
ADD src/etc/services-config/ssh/authorized_keys \
src/etc/services-config/ssh/sshd-bootstrap.conf \
src/etc/services-config/ssh/sshd-bootstrap.env \
/etc/services-config/ssh/
ADD etc/services-config/supervisor/supervisord.conf \
ADD src/etc/services-config/supervisor/supervisord.conf \
/etc/services-config/supervisor/
ADD etc/services-config/supervisor/supervisord.d \
ADD src/etc/services-config/supervisor/supervisord.d \
/etc/services-config/supervisor/supervisord.d/

RUN mkdir -p \
Expand Down Expand Up @@ -152,8 +152,9 @@ ENV SSH_AUTHORIZED_KEYS="" \
# -----------------------------------------------------------------------------
# Set image metadata
# -----------------------------------------------------------------------------
ARG RELEASE_VERSION="2.2.1"
ARG RELEASE_VERSION="2.2.2"
LABEL \
maintainer="James Deathe <[email protected]>" \
install="docker run \
--rm \
--privileged \
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Targets:
DOCKER_IMAGE_TAG variable.
logs Display log output from the running container.
logs-delayed Display log output from the running container after
backing off shortly. This can be necessary when
chaining make targets together.
backing off for STARTUP_TIME seconds. This can be
necessary when chaining make targets together.
pause Pause the running container.
pull Pull the release image from the registry. Requires
the DOCKER_IMAGE_TAG variable.
Expand Down Expand Up @@ -61,6 +61,9 @@ Variables:
artifacts are placed.
- NO_CACHE When true, no cache will be used while running the
build target.
- STARTUP_TIME Defines the number of seconds expected to complete
the startup process, including the bootstrap where
applicable.

endef

Expand Down Expand Up @@ -357,7 +360,7 @@ logs: _prerequisites
@ $(docker) logs $(DOCKER_NAME)

logs-delayed: _prerequisites
@ sleep 2
@ sleep $(STARTUP_TIME)
@ $(MAKE) logs

load: _prerequisites _require-docker-release-tag _require-package-path
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.8 x86_64 / CentOS-7 7.3.1611 x86_64 - SCL/EPEL/IUS Repos / Supervisor / OpenSSH.
CentOS-6 6.9 x86_64 / CentOS-7 7.3.1611 x86_64 - SCL/EPEL/IUS Repos / Supervisor / OpenSSH.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
centos-ssh
==========

Docker Images of CentOS-6 6.8 x86_64 / CentOS-7 7.3.1611 x86_64
Docker Images of CentOS-6 6.9 x86_64 / CentOS-7 7.3.1611 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.7.6` OR `1.7.6` for the [1.7.6](https://github.com/jdeathe/centos-ssh/tree/1.7.6) release tag and `centos-7-2.2.1` OR `2.2.1` for the [2.2.1](https://github.com/jdeathe/centos-ssh/tree/2.2.1) 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.0` OR `1.8.0` for the [1.8.0](https://github.com/jdeathe/centos-ssh/tree/1.8.0) release tag and `centos-7-2.2.2` OR `2.2.2` for the [2.2.2](https://github.com/jdeathe/centos-ssh/tree/2.2.2) release tag.

### Tags and respective `Dockerfile` links

- `centos-7`,`centos-7-2.2.1`,`2.2.1` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh/blob/centos-7/Dockerfile)
- `centos-6`,`centos-6-1.7.6`,`1.7.6` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh/blob/centos-6/Dockerfile)
- `centos-7`,`centos-7-2.2.2`,`2.2.2` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh/blob/centos-7/Dockerfile)
- `centos-6`,`centos-6-1.8.0`,`1.8.0` [(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 @@ -92,7 +92,7 @@ $ sftp -i id_rsa_insecure \

### Running

To run the a docker container from this image you can use the standard docker commands. Alternatively, you can use the embedded (Service Container Manager Interface) [scmi](https://github.com/jdeathe/centos-ssh/blob/centos-7/usr/sbin/scmi) that is included in the image since `1.7.2` / `2.1.2` or, if you have a checkout of the [source repository](https://github.com/jdeathe/centos-ssh), and have make installed the Makefile provides targets to build, install, start, stop etc. where environment variables can be used to configure the container options and set custom docker run parameters.
To run the a docker container from this image you can use the standard docker commands. Alternatively, you can use the embedded (Service Container Manager Interface) [scmi](https://github.com/jdeathe/centos-ssh/blob/centos-7/src/usr/sbin/scmi) that is included in the image since `1.7.2` / `2.1.2` or, if you have a checkout of the [source repository](https://github.com/jdeathe/centos-ssh), and have make installed the Makefile provides targets to build, install, start, stop etc. where environment variables can be used to configure the container options and set custom docker run parameters.

#### SCMI Installation Examples

Expand All @@ -105,10 +105,10 @@ $ docker run \
--rm \
--privileged \
--volume /:/media/root \
jdeathe/centos-ssh:2.2.1 \
jdeathe/centos-ssh:2.2.2 \
/usr/sbin/scmi install \
--chroot=/media/root \
--tag=2.2.1 \
--tag=2.2.2 \
--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.1 \
jdeathe/centos-ssh:2.2.2 \
/usr/sbin/scmi uninstall \
--chroot=/media/root \
--tag=2.2.1 \
--tag=2.2.2 \
--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.1 \
jdeathe/centos-ssh:2.2.2 \
/usr/sbin/scmi install \
--chroot=/media/root \
--tag=2.2.1 \
--tag=2.2.2 \
--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.1
$ docker pull jdeathe/centos-ssh:2.2.2
```

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.1
jdeathe/centos-ssh:2.2.2
) --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.1
jdeathe/centos-ssh:2.2.2
) --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.1
jdeathe/centos-ssh:2.2.2
) --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.1 \
jdeathe/centos-ssh:2.2.2 \
--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.1
jdeathe/centos-ssh:2.2.2
```

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

```
$ sudo -E atomic install \
jdeathe/centos-ssh:2.2.1 \
jdeathe/centos-ssh:2.2.2 \
--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.1
jdeathe/centos-ssh:2.2.2
```

#### Using environment variables
Expand Down
3 changes: 3 additions & 0 deletions environment.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ NO_CACHE ?= false
# Directory path for release packages
DIST_PATH ?= ./dist

# Number of seconds expected to complete container startup including bootstrap.
STARTUP_TIME ?= 2

# ------------------------------------------------------------------------------
# Application container configuration
# ------------------------------------------------------------------------------
Expand Down
File renamed without changes.
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.1"
Environment="DOCKER_IMAGE_TAG=2.2.2"
Environment="DOCKER_PORT_MAP_TCP_22=2020"
Environment="SSH_AUTHORIZED_KEYS="
Environment="SSH_AUTOSTART_SSHD=true"
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions opt/scmi/environment.sh → src/opt/scmi/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ REGISTER_ETCD_PARAMETERS="${REGISTER_ETCD_PARAMETERS:-}"
REGISTER_TTL="${REGISTER_TTL:-60}"
REGISTER_UPDATE_INTERVAL="${REGISTER_UPDATE_INTERVAL:-55}"

# Number of seconds expected to complete container startup including bootstrap.
STARTUP_TIME="${STARTUP_TIME:-2}"

# Application container configuration
SSH_AUTHORIZED_KEYS="${SSH_AUTHORIZED_KEYS:-}"
SSH_AUTOSTART_SSHD="${SSH_AUTOSTART_SSHD:-true}"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit a8d9468

Please sign in to comment.