6 changed files with 140 additions and 28 deletions
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
MIT License |
||||
|
||||
Copyright (c) 2019 Travis Burtrum |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in all |
||||
copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
SOFTWARE. |
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
<img src="https://raw.githubusercontent.com/moparisthebest/static-curl/master/static-curl.svg?sanitize=true" alt="no not that kind" width="32" /> Static curl <img src="https://raw.githubusercontent.com/moparisthebest/static-curl/master/static-curl.svg?sanitize=true" alt="no not that kind" width="32" /> |
||||
----------- |
||||
[](https://travis-ci.org/moparisthebest/static-curl) |
||||
|
||||
These are a couple simple scripts to build a fully static curl binary using an alpine linux docker container. Currently it is a minimal build with OpenSSL and only supporting HTTP and FTP. Tweak configure options in [build.sh](build.sh#L33) if you need something else (and/or suggest or PR). |
||||
|
||||
Grab the latest release (curl 7.67.0) from one of these links, by CPU architecture: |
||||
- [curl-amd64](https://github.com/moparisthebest/static-curl/releases/download/v7.67.0/curl-amd64) |
||||
- [curl-i386](https://github.com/moparisthebest/static-curl/releases/download/v7.67.0/curl-i386) |
||||
- [curl-aarch64](https://github.com/moparisthebest/static-curl/releases/download/v7.67.0/curl-aarch64) |
||||
|
||||
Development |
||||
----------- |
||||
|
||||
File explanation: |
||||
- [build.sh](build.sh) - runs inside an alpine docker container, downloads curl, verifies it with gpg, and builds it |
||||
- [docker_build.sh](docker_build.sh) - runs build.sh inside docker |
||||
- [mykey.asc](mykey.asc) - Daniel Stenberg's [GPG key](https://daniel.haxx.se/address.html) used for signing/verifying curl releases |
||||
- [bicep curl](https://thenounproject.com/term/curl/499187) by Laymik from [the Noun Project](https://thenounproject.com) |
@ -1,10 +1,20 @@
@@ -1,10 +1,20 @@
|
||||
#!/bin/sh |
||||
|
||||
rm -rf /tmp/static-curl/ |
||||
mkdir -p /tmp/static-curl/ |
||||
cp build.sh mykey.asc /tmp/static-curl/ |
||||
DOCKER_IMAGE="$1" |
||||
shift |
||||
ARCH="$1" |
||||
shift |
||||
CURL_VERSION="$1" |
||||
|
||||
docker run -it --rm -v /tmp/static-curl:/tmp alpine /tmp/build.sh |
||||
BUILD_DIR=/tmp/static-curl/ |
||||
|
||||
mv /tmp/static-curl/curl . |
||||
rm -rf /tmp/static-curl/ |
||||
rm -rf "$BUILD_DIR" |
||||
mkdir -p "$BUILD_DIR" |
||||
cp build.sh mykey.asc "$BUILD_DIR" |
||||
|
||||
docker run --rm -v "$BUILD_DIR":/tmp "$DOCKER_IMAGE" /tmp/build.sh "$CURL_VERSION" || exit 1 |
||||
|
||||
mv "$BUILD_DIR"curl "./curl-$ARCH" |
||||
rm -rf "$BUILD_DIR" 2>/dev/null |
||||
|
||||
exit 0 |
||||
|
Loading…
Reference in new issue