-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update alpine-based image to 5.02.5185 * limit buildx to linux/amd64 for now * update various github actions * prevent :latest and :alpine tags push
- Loading branch information
Showing
3 changed files
with
53 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,45 @@ | ||
FROM alpine:3.16 as prep | ||
FROM alpine:3.20 AS prep | ||
|
||
LABEL maintainer="Tomohisa Kusano <[email protected]>" \ | ||
contributors="See CONTRIBUTORS file <https://github.com/siomiz/SoftEtherVPN/blob/master/CONTRIBUTORS>" | ||
|
||
ENV BUILD_VERSION=4.43-9799-beta \ | ||
SHA256_SUM=9153a95574f2afd8259ff729e6da3a9898211b69d7d391419270935c8482888c | ||
ENV BUILD_VERSION=5.02.5185 \ | ||
GIT_VERIFY_PUBKEY=B5690EEEBB952194 | ||
|
||
RUN wget https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/archive/v${BUILD_VERSION}.tar.gz \ | ||
&& echo "${SHA256_SUM} v${BUILD_VERSION}.tar.gz" | sha256sum -c \ | ||
&& mkdir -p /usr/local/src \ | ||
&& tar -x -C /usr/local/src/ -f v${BUILD_VERSION}.tar.gz \ | ||
&& rm v${BUILD_VERSION}.tar.gz | ||
WORKDIR /usr/local/src/SoftEtherVPN | ||
|
||
FROM alpine:3.16 as build | ||
# RUN wget https://github.com/SoftEtherVPN/SoftEtherVPN/archive/refs/tags/${BUILD_VERSION}.tar.gz \ | ||
# && echo "${SHA256_SUM} ${BUILD_VERSION}.tar.gz" | sha256sum -c \ | ||
# && mkdir -p /usr/local/src \ | ||
# && tar -x -C /usr/local/src/ -f ${BUILD_VERSION}.tar.gz \ | ||
# && rm ${BUILD_VERSION}.tar.gz | ||
|
||
RUN apk add -U git gnupg \ | ||
&& git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git --depth 1 --single-branch --branch=${BUILD_VERSION} . \ | ||
&& gpg --receive-keys ${GIT_VERIFY_PUBKEY} \ | ||
&& git verify-commit ${BUILD_VERSION} \ | ||
&& git submodule init \ | ||
&& git submodule update --recommend-shallow | ||
|
||
FROM alpine:3.20 AS build | ||
|
||
COPY --from=prep /usr/local/src /usr/local/src | ||
|
||
ENV LANG=en_US.UTF-8 | ||
ENV LANG=en_US.UTF-8 \ | ||
USE_MUSL=YES | ||
|
||
RUN apk add -U build-base ncurses-dev openssl-dev readline-dev zip zlib-dev \ | ||
&& cd /usr/local/src/SoftEtherVPN_Stable-* \ | ||
RUN apk add -U build-base cmake libsodium-dev ncurses-dev openssl-dev readline-dev zip zlib-dev \ | ||
&& cd /usr/local/src/SoftEtherVPN \ | ||
&& ./configure \ | ||
&& make \ | ||
&& make install \ | ||
&& touch /usr/vpnserver/vpn_server.config \ | ||
&& zip -r9 /artifacts.zip /usr/vpn* /usr/bin/vpn* | ||
&& make -C build \ | ||
&& make -C build install \ | ||
&& zip -r9 /artifacts.zip \ | ||
/usr/local/bin/vpn* /usr/local/libexec/softether/* \ | ||
/usr/local/lib/libcedar.so /usr/local/lib/libmayaqua.so \ | ||
/usr/lib/libsodium.so* \ | ||
/usr/local/bin/list_cpu_features | ||
|
||
FROM alpine:3.16 | ||
FROM alpine:3.20 | ||
|
||
COPY --from=build /artifacts.zip / | ||
|
||
|
@@ -40,7 +53,7 @@ RUN apk add -U --no-cache bash iptables openssl-dev \ | |
&& rm /artifacts.zip \ | ||
&& rm -rf /opt \ | ||
&& ln -s /usr/vpnserver /opt \ | ||
&& find /usr/bin/vpn* -type f ! -name vpnserver \ | ||
&& find /usr/local/bin/vpn* -type f ! -name vpnserver \ | ||
-exec sh -c 'ln -s {} /opt/$(basename {})' \; | ||
|
||
WORKDIR /usr/vpnserver/ | ||
|
@@ -51,4 +64,4 @@ ENTRYPOINT ["/entrypoint.sh"] | |
|
||
EXPOSE 500/udp 4500/udp 1701/tcp 1194/udp 5555/tcp 443/tcp | ||
|
||
CMD ["/usr/bin/vpnserver", "execsvc"] | ||
CMD ["/usr/local/bin/vpnserver", "execsvc"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters