From 906cbb9237698b67fe885f15d710600c5ebe4f41 Mon Sep 17 00:00:00 2001 From: travisladuke Date: Thu, 15 Feb 2024 12:50:43 -0800 Subject: [PATCH] ci: Work on publishing a docker container --- .drone.yml | 21 +++++++++++++++++++++ Dockerfile | 11 ++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..a2cd4f0 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,21 @@ +kind: pipeline +name: default + +steps: +- name: docker publish + image: plugins/docker + settings: + username: laduker + password: + from_secret: dockerhub_token + repo: zerotier/pylon + tags: + - latest + - ${DRONE_TAG##v} + ssh-agent-key: + from_secret: private_key + when: + branch: + - main + event: + - tag diff --git a/Dockerfile b/Dockerfile index 0834ea7..f73c02f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,18 @@ FROM debian:bookworm-slim as build -COPY . /code -WORKDIR /code - RUN apt-get update -qq && apt-get install -y \ build-essential git make pkg-config cmake libssl-dev +COPY ./ /code +WORKDIR /code + RUN make release FROM debian:bookworm-slim COPY --from=build /code/pylon /usr/local/bin +# EXPOSE 443 +# EXPOSE 9993/udp +# ENV ZT_PYLON_SECRET_KEY= +# ENV ZT_PYLON_WHITELISTED_PORT= ENTRYPOINT [ "/usr/local/bin/pylon" ] +CMD ["reflect"]