title: how to create a non root user to access SSH commands with Docker
body: <p>I have an application that gets deployed from a docker image to a Kubernetes pod. Inside of my docker image I run the following command</p>
  <pre><code>FROM openjdk:17.0.1-slim
  
  USER root
  
  WORKDIR /opt/app
  ARG JAR_FILE
  ARG INFO_APP_BUILD
  
  RUN apt-get update
  RUN apt-get install -y sshpass
  RUN apt-get install -y openssh-service
  
  COPY /build/libs/*SNAPSHOT.jar /opt/app/app.jar
  ENV INFO_APP_BUILD=${INFO_APP_BUILD}
  
  EXPOSE 8080
  
  CMD java -jar /opt/app/app.jar
  </code></pre>
  <p>When the application gets deployed, out of my control, the user gets set to a non root user.</p>
  <p>Now the important part is that when i try to launch an ssh command i get an error message <code>no user exists for uid [random id here]</code></p>
  <p>My goal is to configure the docker image to create a user and grant it permission to use the SSH command.</p>