Skip to content

Commit

Permalink
ci: Work on publishing a docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
laduke committed Feb 15, 2024
1 parent 1c943e1 commit 2f8d499
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 2f8d499

Please sign in to comment.