Dockerfile
| 1 | FROM alpine:edge |
| 2 | WORKDIR /opt |
| 3 | COPY autopush.sh . |
| 4 | RUN apk add git tini openssh |
| 5 | #should contain a key pair |
| 6 | #name of the key is is passed in via the SSH_KEY_NAME env variable, e.g. "id_rsa" |
| 7 | VOLUME /ssh |
| 8 | #should contain the repository to be pushed |
| 9 | VOLUME /git |
| 10 | ENTRYPOINT ["/sbin/tini", "--"] |
| 11 | CMD ["/opt/autopush.sh"] |
| 12 |