-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update alpine to 3.18 * Build using docker build, without additional commands * Make the result runnable
- Loading branch information
Showing
4 changed files
with
62 additions
and
25 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 |
---|---|---|
|
@@ -50,7 +50,7 @@ jobs: | |
- name: prepare | ||
run: git submodule update --init | ||
- name: build-static | ||
run: sudo docker build -t sipp-build docker && sudo docker run -v $PWD:/src sipp-build | ||
run: docker build -f docker/Dockerfile --output=. --target=bin . | ||
- uses: actions/[email protected] | ||
with: | ||
name: sipp | ||
|
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,5 +1,34 @@ | ||
FROM alpine:3.10 | ||
# Usage (from within the git repo): | ||
# git submodule update --init | ||
# docker build -t sipp -f docker/Dockerfile . | ||
|
||
RUN apk add --no-cache binutils make cmake gcc g++ ncurses-static libpcap-dev ncurses-dev gsl-dev git | ||
FROM alpine:3.18 AS build | ||
|
||
CMD cd /src && rm -f CMakeCache.txt && cmake . -DBUILD_STATIC=1 -DUSE_PCAP=1 -DUSE_GSL=1 && make | ||
RUN apk add --no-cache \ | ||
binutils \ | ||
cmake \ | ||
g++ \ | ||
gcc \ | ||
git \ | ||
gsl-dev \ | ||
gsl-static \ | ||
libpcap-dev \ | ||
make \ | ||
ncurses-dev \ | ||
ncurses-static \ | ||
ninja | ||
|
||
WORKDIR /sipp | ||
COPY CMakeLists.txt ./ | ||
COPY src src | ||
COPY include include | ||
COPY gtest gtest | ||
RUN --mount=type=bind,target=.git,source=.git cmake . -G Ninja -DBUILD_STATIC=1 -DUSE_PCAP=1 -DUSE_GSL=1 | ||
RUN ninja | ||
|
||
FROM scratch AS bin | ||
COPY --from=build /sipp/sipp /sipp | ||
|
||
FROM alpine:3.18 | ||
CMD ["sipp"] | ||
COPY --from=build /sipp/sipp /usr/local/bin/sipp |
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,29 +1,39 @@ | ||
FROM alpine:3.13 | ||
# Usage (from within the git repo): | ||
# git submodule update --init | ||
# docker build -t sipp:full -f docker/Dockerfile.full . | ||
|
||
FROM alpine:3.18 AS build | ||
|
||
RUN apk add --no-cache \ | ||
binutils \ | ||
make \ | ||
cmake \ | ||
gcc \ | ||
g++ \ | ||
gcc \ | ||
git \ | ||
ncurses-dev \ | ||
ncurses-static \ | ||
libpcap-dev \ | ||
gsl-dev \ | ||
gsl-static \ | ||
openssl-dev \ | ||
openssl-libs-static \ | ||
libpcap-dev \ | ||
linux-headers \ | ||
lksctp-tools-dev \ | ||
lksctp-tools-static | ||
lksctp-tools-static \ | ||
make \ | ||
ncurses-dev \ | ||
ncurses-static \ | ||
ninja \ | ||
openssl-dev \ | ||
openssl-libs-static | ||
|
||
CMD cd /src \ | ||
&& rm -f CMakeCache.txt \ | ||
&& cmake . -DBUILD_STATIC=1 -DUSE_PCAP=1 -DUSE_GSL=1 -DUSE_SSL=1 -DUSE_SCTP=1 \ | ||
&& make | ||
WORKDIR /sipp | ||
COPY CMakeLists.txt ./ | ||
COPY src src | ||
COPY include include | ||
COPY gtest gtest | ||
RUN --mount=type=bind,target=.git,source=.git cmake . -G Ninja -DBUILD_STATIC=1 -DUSE_PCAP=1 -DUSE_GSL=1 -DUSE_SSL=1 -DUSE_SCTP=1 | ||
RUN ninja | ||
|
||
# Usage (from within the git repo): | ||
# git submodule update --init | ||
# docker build -t sipp-build -f docker/Dockerfile.full docker | ||
# docker run -v $PWD:/src sipp-build | ||
FROM scratch AS bin | ||
COPY --from=build /sipp/sipp /sipp | ||
|
||
FROM alpine:3.18 | ||
CMD ["sipp"] | ||
COPY --from=build /sipp/sipp /usr/local/bin/sipp |