use python

This commit is contained in:
Nguyen Huu Thuong
2020-06-13 08:46:25 +02:00
parent 124061301d
commit ecd50df959
4 changed files with 156 additions and 155 deletions

View File

@@ -1,22 +1,27 @@
FROM alpine:latest
FROM python:3.8.3-slim-buster
LABEL "maintainer"="Scott Ng <thuongnht@gmail.com>"
LABEL "repository"="https://github.com/cross-the-world/ssh-scp-ssh-pipelines"
LABEL "version"="1.0.0"
LABEL "version"="latest"
LABEL "com.github.actions.name"="ssh-scp-ssh-pipelines"
LABEL "com.github.actions.description"="Pipelines: ssh -> scp -> ssh"
LABEL "com.github.actions.description"="Pipeline: ssh -> scp -> ssh"
LABEL "com.github.actions.icon"="terminal"
LABEL "com.github.actions.color"="gray-dark"
RUN apk update && \
apk add ca-certificates && \
apk add --no-cache openssh-client openssl openssh sshpass && \
apk add --no-cache --upgrade bash openssh sshpass && \
rm -rf /var/cache/apk/*
RUN apt-get update -y && \
apt-get install -y ca-certificates openssh-client openssl sshpass
COPY entrypoint.sh /entrypoint.sh
COPY test /opt/test
RUN chmod +x /entrypoint.sh
COPY requirements.txt /requirements.txt
RUN pip3 install -r /requirements.txt
ENTRYPOINT ["/entrypoint.sh"]
RUN mkdir -p /opt/tools
WORKDIR /opt/tools
COPY entrypoint.sh /opt/tools/entrypoint.sh
RUN chmod +x /opt/tools/entrypoint.sh
COPY app.py /opt/tools/app.py
RUN chmod +x /opt/tools/app.py
ENTRYPOINT ["./entrypoint.sh"]