Skip to content

Commit

Permalink
fix(debian) Add missing packages to allow git cloning by ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
gounthar committed Nov 16, 2022
1 parent 70c7dba commit e8a6599
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
15 changes: 10 additions & 5 deletions 11/bullseye/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,19 @@ RUN groupadd -g "${gid}" "${group}" \

ARG AGENT_WORKDIR=/home/${user}/agent

## Always use the latest Alpine packages: no need for versions
## Always use the latest Debian packages: no need for versions
# hadolint ignore=DL3008
RUN apt-get update \
&& apt-get --yes --no-install-recommends install \
git-lfs \
curl \
ca-certificates \
fontconfig \
ca-certificates \
curl \
fontconfig \
git \
git-lfs \
less \
netbase \
openssh-client \
patch \
&& rm -rf /var/lib/apt/lists/*

ARG VERSION=3071.v7e9b_0dc08466
Expand Down
9 changes: 7 additions & 2 deletions 17/bullseye/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@ ARG AGENT_WORKDIR=/home/"${user}"/agent
# hadolint ignore=DL3008
RUN apt-get update \
&& apt-get --yes --no-install-recommends install \
git-lfs \
curl \
ca-certificates \
curl \
fontconfig \
git \
git-lfs \
less \
netbase \
openssh-client \
patch \
&& rm -rf /var/lib/apt/lists/*

ARG VERSION=3071.v7e9b_0dc08466
Expand Down
11 changes: 8 additions & 3 deletions tests/tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ARCH=${ARCH:-x86_64}
assert_equal "${output}" "UTF-8"
}

@test "[${SUT_IMAGE}] image has bash, curl and java installed and in the PATH" {
@test "[${SUT_IMAGE}] image has bash, curl, ssh and java installed and in the PATH" {
local cid
cid="$(docker run -d -it -P "${SUT_IMAGE}" /bin/bash)"

Expand All @@ -45,13 +45,18 @@ ARCH=${ARCH:-x86_64}

run docker exec "${cid}" sh -c "command -v curl"
assert_success
run docker exec "${cid}" sh -c "curl --version"
run docker exec "${cid}" curl --version
assert_success

run docker exec "${cid}" sh -c "command -v java"
assert_success

run docker exec "${cid}" sh -c "java -version"
run docker exec "${cid}" java -version
assert_success

run docker exec "${cid}" sh -c "command -v ssh"
assert_success
run docker exec "${cid}" ssh -V
assert_success

run docker exec "${cid}" sh -c "printenv | grep AGENT_WORKDIR"
Expand Down

0 comments on commit e8a6599

Please sign in to comment.