I am trying to add ssh to my dockerfile and locally the container runs fine. but on jenkins k8s cluster it fails to come up and exits. any hint?
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends
build-essential
ca-certificates
curl
g++
gcc
git
fuse
openjdk-11-jdk-headless
python
python-dev
python-pkg-resources
python-setuptools
python3
python3-dev
python3-pip
python3-pkg-resources
python3-setuptools
software-properties-common
ssh
unzip
wget
zip
zlib1g-dev
# Download and install specific version (that matches our redis deployments) of Redis
ENV REDIS_VERSION 6.2.13
RUN set -e &&
wget http://download.redis.io/releases/redis-${REDIS_VERSION}.tar.gz &&
tar xzf redis-${REDIS_VERSION}.tar.gz &&
cd redis-${REDIS_VERSION} &&
make &&
make install
RUN rm -rf /var/lib/apt/lists/* && apt-get clean
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini
RUN chmod +x /sbin/tini
pod yaml on jenkins is
apiVersion: v1
kind: Pod
spec:
imagePullSecrets:
- name: artifactory-creds
containers:
- name: main
image: artifactory.team/ssh-05ba8e
resources:
requests:
memory: 4Gi
cpu: 2
limits:
memory: 8Gi
cpu: 4
securityContext:
capabilities:
add:
- SYS_ADMIN
privileged: true
runAsUser: 0
procMount: Default
command:
- /sbin/tini
args:
- --
- sleep
- infinity