mirror of
https://github.com/zyclonite/zerotier-docker.git
synced 2024-12-04 21:40:43 +01:00
move dockerfile out of build action
This commit is contained in:
parent
1ff4bcd5ee
commit
cdf1a810a1
33
.github/workflows/multiarch.yml
vendored
33
.github/workflows/multiarch.yml
vendored
@ -33,39 +33,6 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y qemu-user-static
|
||||
|
||||
- name: Create Dockerfile
|
||||
run: |
|
||||
cat > Dockerfile << EOF
|
||||
|
||||
ARG ARCH
|
||||
ARG ALPINE_VERSION
|
||||
ARG ZT_COMMIT
|
||||
ARG ZT_VERSION
|
||||
|
||||
FROM docker.io/\${ARCH}/alpine:${ALPINE_VERSION} as builder
|
||||
|
||||
RUN apk add --update alpine-sdk linux-headers \
|
||||
&& git clone --quiet https://github.com/zerotier/ZeroTierOne.git /src \
|
||||
&& git -C src reset --quiet --hard ${ZT_COMMIT} \
|
||||
&& cd /src \
|
||||
&& make -f make-linux.mk
|
||||
|
||||
FROM docker.io/\${ARCH}/alpine:${ALPINE_VERSION}
|
||||
LABEL version="${ZT_VERSION}"
|
||||
LABEL description="ZeroTier One as Docker Image"
|
||||
|
||||
RUN apk add --update --no-cache libc6-compat libstdc++
|
||||
|
||||
EXPOSE 9993/udp
|
||||
|
||||
COPY --from=builder /src/zerotier-one /usr/sbin/
|
||||
RUN mkdir -p /var/lib/zerotier-one \
|
||||
&& ln -s /usr/sbin/zerotier-one /usr/sbin/zerotier-idtool \
|
||||
&& ln -s /usr/sbin/zerotier-one /usr/sbin/zerotier-cli
|
||||
|
||||
ENTRYPOINT ["zerotier-one"]
|
||||
EOF
|
||||
|
||||
- name: Build Image
|
||||
id: build_image
|
||||
uses: redhat-actions/buildah-build@v2
|
||||
|
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@ -0,0 +1,27 @@
|
||||
ARG ARCH
|
||||
ARG ALPINE_VERSION
|
||||
ARG ZT_COMMIT
|
||||
ARG ZT_VERSION
|
||||
|
||||
FROM docker.io/\${ARCH}/alpine:${ALPINE_VERSION} as builder
|
||||
|
||||
RUN apk add --update alpine-sdk linux-headers \
|
||||
&& git clone --quiet https://github.com/zerotier/ZeroTierOne.git /src \
|
||||
&& git -C src reset --quiet --hard ${ZT_COMMIT} \
|
||||
&& cd /src \
|
||||
&& make -f make-linux.mk
|
||||
|
||||
FROM docker.io/\${ARCH}/alpine:${ALPINE_VERSION}
|
||||
LABEL version="${ZT_VERSION}"
|
||||
LABEL description="ZeroTier One as Docker Image"
|
||||
|
||||
RUN apk add --update --no-cache libc6-compat libstdc++
|
||||
|
||||
EXPOSE 9993/udp
|
||||
|
||||
COPY --from=builder /src/zerotier-one /usr/sbin/
|
||||
RUN mkdir -p /var/lib/zerotier-one \
|
||||
&& ln -s /usr/sbin/zerotier-one /usr/sbin/zerotier-idtool \
|
||||
&& ln -s /usr/sbin/zerotier-one /usr/sbin/zerotier-cli
|
||||
|
||||
ENTRYPOINT ["zerotier-one"]
|
Loading…
Reference in New Issue
Block a user