Skip to content

Instantly share code, notes, and snippets.

@jonnyzzz
Created August 30, 2021 12:48
Show Gist options
  • Select an option

  • Save jonnyzzz/ad70db7e9cc958ba6d4c2816d119b634 to your computer and use it in GitHub Desktop.

Select an option

Save jonnyzzz/ad70db7e9cc958ba6d4c2816d119b634 to your computer and use it in GitHub Desktop.

Revisions

  1. jonnyzzz created this gist Aug 30, 2021.
    13 changes: 13 additions & 0 deletions OpenSSL container.kt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    class OpenSSLContainer : GenericContainer<OpenSSLContainer>(
    ImageFromDockerfile().withDockerfileFromBuilder { it
    .from("ubuntu:20.04")
    .env("DEBIAN_FRONTEND", "noninteractive")
    .env("LC_ALL", "C.UTF-8")
    .run("apt-get update && apt-get install -y openssl")
    .run("openssl version")
    //we need a running container to call `execInContainer` commands
    .cmd("/bin/bash -c 'while true; do sleep 10; done'")
    })


    //use executeInContainer command to run `openssl` calls