Browse Source

new: add ssh to docker image to support git ``host-resources`` on ssh.

test1
Valentin Lab 6 years ago
parent
commit
8dfe137964
  1. 3
      Dockerfile
  2. 6
      bin/compose

3
Dockerfile

@ -112,6 +112,9 @@ RUN apk add jq
## requiring ``getfacl/setfacl`` command for allowing to setup some permissions in charms ## requiring ``getfacl/setfacl`` command for allowing to setup some permissions in charms
RUN apk add acl RUN apk add acl
## required by git through ssh (for host-resources for instance)
RUN apk add openssh-client
## install compose ## install compose
COPY ./bin/ /usr/local/bin/ COPY ./bin/ /usr/local/bin/

6
bin/compose

@ -209,6 +209,12 @@ mk_docker_run_options() {
COMPOSE_DOCKER_IMAGE=${COMPOSE_DOCKER_IMAGE:-docker.0k.io/compose} COMPOSE_DOCKER_IMAGE=${COMPOSE_DOCKER_IMAGE:-docker.0k.io/compose}
docker_run_opts+=("-e" "COMPOSE_DOCKER_IMAGE=$COMPOSE_DOCKER_IMAGE") docker_run_opts+=("-e" "COMPOSE_DOCKER_IMAGE=$COMPOSE_DOCKER_IMAGE")
## SSH config
docker_run_opts+=(
"-v" "/root/.ssh:/root/.ssh:ro"
"-v" "/etc/ssh:/etc/ssh"
)
COMPOSE_LAUNCHER_BIN=$(readlink -f "${BASH_SOURCE[0]}") COMPOSE_LAUNCHER_BIN=$(readlink -f "${BASH_SOURCE[0]}")
docker_run_opts+=("-v" "$COMPOSE_LAUNCHER_BIN:/usr/local/bin/compose") docker_run_opts+=("-v" "$COMPOSE_LAUNCHER_BIN:/usr/local/bin/compose")

Loading…
Cancel
Save