-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (31 loc) · 873 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM alpine:3.15 AS socat-builder
ARG socat_url=http://www.dest-unreach.org/socat/download/socat-1.7.4.3.tar.gz
RUN \
cd /tmp && \
apk add --no-cache \
curl \
gcc \
linux-headers \
make \
musl-dev \
ncurses-dev \
ncurses-static \
openssl-dev \
openssl-libs-static \
readline-dev \
readline-static \
&& \
curl -fsSL "${socat_url}" | tar xz --strip-components=1 && \
sed -i 's/ncurses/ncursesw/g' configure && \
sc_cv_getprotobynumber_r=2 \
./configure \
--prefix=/usr \
CPPFLAGS=-DNETDB_INTERNAL=-1 \
LDFLAGS=-static \
&& \
sed -i 's|<netinet/if_ether\.h>|<linux/if_ether.h>|' sysincludes.h && \
make install prefix=/socat datarootdir=.
FROM scratch
LABEL maintainer="https://github.com/ep76/docker-socat-static"
COPY --from=socat-builder /socat /usr
ENTRYPOINT [ "/usr/bin/socat" ]