commit aa5b17fa91751f71a3a4211af8f8f94765926648 Author: Damir Ibragimov Date: Wed Sep 13 19:41:51 2023 +0000 Update 2 files - /Dockerfile - /totp.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9e4315b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM ubuntu:jammy + +ENV DEBIAN_FRONTEND=noninteractive +ENV TZ=Europe/Moscow + +WORKDIR /software + +RUN \ + apt update && \ + apt install apt apt-utils sudo git wget curl make gcc tini && \ + apt upgrade -y && \ + apt install -y golang && \ + apt autoremove --purge -y && apt clean -y && \ + cd /software && git clone https://github.com/arcanericky/totp.git && \ + make linux-amd64 && \ + cd ./bin && ln -s ./totp-linux-amd64 /usr/local/bin + +ENV PATH=$PATH:/usr/local/bin + +ENTRYPOINT ["tini", "--"] +CMD ["sleep","infinity"] \ No newline at end of file diff --git a/totp.sh b/totp.sh new file mode 100644 index 0000000..fd74c65 --- /dev/null +++ b/totp.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +read -p "Secret name: " SECRET + +docker exec -it totp-docker totp $SECRET \ No newline at end of file