jenkinsci / jenkinsci/docker-ssh-agent

ENTRYPOINT ["setup-sshd"] in docker files

Open
#101 1 comment 3 reactions 0 assignees View on GitHub
bug
Dominant language
PowerShell
Stars
208
Forks
177
Avg merge
1d 17h
Merged PRs (30d)
11

Description

### Jenkins and plugins versions report

Environment


```text
Paste the output here
```

### What Operating System are you using (both controller, and any agents involved in the problem)?

ubuntu 20.04

### Reproduction steps

1. build image from dockerfile: https://github.com/jenkinsci/docker-ssh-agent/blob/master/11/bullseye/Dockerfile
2. run container

### Expected Results

container should run with args

### Actual Results

docker container fails to start:
```
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "setup-sshd": executable file not found in $PATH: unknown.
ERRO[0000] error waiting for container: context canceled
```

### Anything else?

in docker file either add:
```
RUN echo "PATH=${PATH}" >> /etc/environment
COPY setup-sshd /usr/local/bin/setup-sshd
RUN chmod +x /usr/local/bin/setup-sshd

EXPOSE 22

ENTRYPOINT ["setup-sshd"]
```

or

```
RUN echo "PATH=${PATH}" >> /etc/environment
COPY setup-sshd /usr/local/bin/setup-sshd

EXPOSE 22

ENTRYPOINT ["bash","setup-sshd"]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.