diff --git a/Dockerfile b/Dockerfile index 5770df6..ee946c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM ubuntu -ENV PROJ_NAME=python-tool +FROM alpine +ENV PROJ_NAME=ssh-docker -# Install Python -FROM python:3.10.6 as PYTHON - -# Copy project files ADD ./ /$PROJ_NAME +RUN apk update && apk add --no-cache \ + openssh-client \ + autossh \ + sshpass # Run entrypoint -ENTRYPOINT [""] +CMD ["/usr/bin/ssh"] diff --git a/Jenkinsfile b/Jenkinsfile index 64b5fc2..266e2fc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { } environment { WORKSPACE_PATH = "/opt/nomad/alloc/${NOMAD_ALLOC_ID}/${NOMAD_TASK_NAME}${WORKSPACE}" - DESCRIPTION = "Another amazing piece of software written by Cronocide." + DESCRIPTION = "A smol container for SSH client operations." } stages { stage('Prepare') { diff --git a/README.md b/README.md index 74acf49..8c1c95e 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,4 @@ -# python-template +# ssh-docker -Template repository for Docker image creation and deployment. - - -# Deployment Checklist - -* Add Jenkins user to project as a Developer in Git -* Write the description in the Jenkinsfile env variable -* Add a private Github push mirror -* Add `?job=` to the webhook for Jenkins -* Rename the project in the README -* Delete this checklist from the README +A smol container for SSH client operations. +See the [Dockerfile](Dockerfile) for more details. diff --git a/build.sh b/build.sh index c51a921..e676822 100755 --- a/build.sh +++ b/build.sh @@ -107,6 +107,7 @@ cicd_build() { echo "Building Software" docker build --pull=true \ --label "org.opencontainers.image.vendor=cronocide.net" \ + --label "org.opencontainers.image.authors=github@cronocide.com" \ --label "org.opencontainers.image.title=${PROJECT_NAME}" \ --label "org.opencontainers.image.url=https://${GIT_REPO_NAME}" \ --label "org.opencontainers.image.source=https://${IMAGE_NAME}" \ @@ -173,7 +174,7 @@ __no_req "$ACTION" && error "Action $ACTION is not recognized as a valid action. # Fill in variables if not supplied by CICD [ -z "$USERN" ] && export USERN=cronocide -[ -z "$GIT_REPO_NAME" ] && export GIT_REPO_NAME=git.cronocide.net +[ -z "$GIT_REPO_NAME" ] && export GIT_REPO_NAME=ghcr.io # Define needed build strings