forked from tmate-io/tmate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Static builds are possible with the musl C library. glibc is capricious when it comes to static linking and DNS support (and other things).
- Loading branch information
Showing
5 changed files
with
29 additions
and
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM alpine:3.10 | ||
|
||
WORKDIR /build | ||
|
||
RUN apk add --no-cache wget cmake make gcc g++ linux-headers zlib-dev openssl-dev \ | ||
automake autoconf libevent-dev ncurses-dev msgpack-c-dev libexecinfo-dev \ | ||
ncurses-static libexecinfo-static libevent-static msgpack-c ncurses-libs \ | ||
libevent libexecinfo openssl zlib | ||
|
||
RUN set -ex; \ | ||
mkdir -p /src/libssh/build; \ | ||
cd /src; \ | ||
wget -O libssh.tar.xz https://www.libssh.org/files/0.9/libssh-0.9.0.tar.xz; \ | ||
tar -xf libssh.tar.xz -C /src/libssh --strip-components=1; \ | ||
cd /src/libssh/build; \ | ||
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \ | ||
-DWITH_SFTP=OFF -DWITH_SERVER=OFF -DWITH_PCAP=OFF \ | ||
-DWITH_STATIC_LIB=ON -DWITH_GSSAPI=OFF ..; \ | ||
make -j $(nproc); \ | ||
make install | ||
|
||
COPY . . | ||
|
||
RUN ./autogen.sh | ||
RUN ./configure --enable-static | ||
RUN make -j $(nproc) | ||
RUN strip tmate |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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