forked from praetorian-inc/nerva
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.devcontainer
More file actions
48 lines (43 loc) · 1.4 KB
/
Dockerfile.devcontainer
File metadata and controls
48 lines (43 loc) · 1.4 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Dockerfile.devcontainer - Development container with SCTP support
FROM golang:1.25-bookworm
# Install SCTP development libraries and tools
RUN apt-get update && apt-get install -y \
libsctp-dev \
lksctp-tools \
netcat-openbsd \
iproute2 \
iputils-ping \
tcpdump \
net-tools \
vim \
git \
make \
build-essential \
kmod \
&& rm -rf /var/lib/apt/lists/*
# Install Go development tools
RUN go install golang.org/x/tools/gopls@latest && \
go install github.com/go-delve/delve/cmd/dlv@latest && \
go install honnef.co/go/tools/cmd/staticcheck@latest && \
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Set working directory
WORKDIR /workspace
# Load SCTP kernel module on container startup
# Note: This requires --privileged or --cap-add=SYS_MODULE
RUN echo '#!/bin/bash\n\
set -e\n\
# Load SCTP kernel module\n\
if ! lsmod | grep -q sctp; then\n\
modprobe sctp 2>/dev/null || echo "Warning: Could not load SCTP module (may already be loaded or unavailable)"\n\
fi\n\
# Verify SCTP support\n\
if [ -f /proc/net/sctp/snmp ]; then\n\
echo "SCTP support verified: /proc/net/sctp/snmp exists"\n\
else\n\
echo "Warning: SCTP support may not be available"\n\
fi\n\
exec "$@"\n\
' > /usr/local/bin/docker-entrypoint.sh && \
chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["/bin/bash"]