diff --git a/.drone.yml b/.drone.yml index 4f3deec..6ba4603 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,4 +25,18 @@ steps: - sha256 when: event: - - tag \ No newline at end of file + - tag + + - name: publish_docker + image: plugins/docker:latest + pull: if-not-exists + settings: + username: + from_secret: hub_username + password: + from_secret: hub_password + repo: rainerosion/ssh-manager + tags: latest + build_args: + - ssh_manage=./ssh_manage + dockerfile: drone/Dockerfile \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a275743 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM alpine:latest +ARG ssh_manage +ENV TIME_ZONE=Asia/Shanghai +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && apk update && apk add tzdata \ + && ln -snf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime && echo $TIME_ZONE > /etc/timezone +WORKDIR /root +ADD ${ssh_manage} /root/ +EXPOSE 8082 +CMD [ "/root/ssh_manage" ] \ No newline at end of file