Skip to content

Commit

Permalink
Bump versions
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall committed Sep 4, 2024
1 parent c236f29 commit 1289439
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:23.04
FROM ubuntu:24.04

ARG TOOLCHAIN

Expand All @@ -17,30 +17,30 @@ RUN curl https://sh.rustup.rs -sSf | \
sh -s -- -y --default-toolchain $TOOLCHAIN && \
/root/.cargo/bin/rustup target add x86_64-unknown-linux-musl

RUN cd /tmp && LIBLZMA_VERSION=5.4.4 && \
RUN cd /tmp && LIBLZMA_VERSION=5.6.2 && \
curl -LO "https://tukaani.org/xz/xz-$LIBLZMA_VERSION.tar.xz" && \
tar xf "xz-$LIBLZMA_VERSION.tar.xz" && cd xz-$LIBLZMA_VERSION && \
CC=musl-gcc ./configure --enable-static --disable-shared --prefix=/usr/local/musl && \
make install

# See https://github.com/openssl/openssl/issues/7207 for "-idirafter" CC setting
RUN cd /tmp && OPENSSL_VERSION=3.1.3 && \
curl -LO "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz" && \
RUN cd /tmp && OPENSSL_VERSION=3.3.2 && \
curl -LO "https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VERSION}/openssl-${OPENSSL_VERSION}.tar.gz" && \
tar xf "openssl-$OPENSSL_VERSION.tar.gz" && cd "openssl-$OPENSSL_VERSION" && \
env CC="musl-gcc -static -idirafter /usr/include/ -idirafter /usr/include/x86_64-linux-gnu/" ./Configure \
no-shared no-zlib no-engine no-unit-test \
-fPIC --prefix=/usr/local/musl linux-x86_64 && \
env C_INCLUDE_PATH=/usr/local/musl/include/ make depend && \
make install_sw

RUN cd /tmp && ZLIB_VERSION=1.3 && \
RUN cd /tmp && ZLIB_VERSION=1.3.1 && \
curl -LO "https://zlib.net/zlib-$ZLIB_VERSION.tar.gz" && \
tar xf "zlib-$ZLIB_VERSION.tar.gz" && cd "zlib-$ZLIB_VERSION" && \
CC=musl-gcc ./configure --static --prefix=/usr/local/musl && \
make install

RUN cd /tmp && SQLITE_VERSION=sqlite-autoconf-3430100 && \
curl -LO https://www.sqlite.org/2023/$SQLITE_VERSION.tar.gz && \
RUN cd /tmp && SQLITE_VERSION=sqlite-autoconf-3460100 && \
curl -LO https://www.sqlite.org/2024/$SQLITE_VERSION.tar.gz && \
tar xf "$SQLITE_VERSION.tar.gz" && cd "$SQLITE_VERSION" && \
CC=musl-gcc ./configure --enable-static --disable-shared --prefix=/usr/local/musl && \
make install
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
IMAGE=fredrikfornwall/rust-static-builder
STABLE_VERSION=1.72.1
STABLE_VERSION=1.80.1
CURRENT_DATE:=$(shell date "+%Y-%m-%d")

build-stable:
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ From inside your project directoring containing a `Cargo.toml` file:

```sh
# Stable release channel:
docker run -v "$PWD":/build fredrikfornwall/rust-static-builder:1.70.0
docker run -v "$PWD":/build fredrikfornwall/rust-static-builder:1.80.1

# Nightly release channel:
docker run -v "$PWD":/build fredrikfornwall/rust-static-builder-nightly:2020-05-09
docker run -v "$PWD":/build fredrikfornwall/rust-static-builder-nightly:2024-09-04
```

A statically linked binary will be created under `target/x86_64-unknown-linux-musl/release/`.
Expand All @@ -26,7 +26,7 @@ docker run \
-v "$PWD":/build \
-v $HOME/.cargo/git:/root/.cargo/git \
-v $HOME/.cargo/registry:/root/.cargo/registry \
fredrikfornwall/rust-static-builder:1.70.0
fredrikfornwall/rust-static-builder:1.80.1
```

## Testing
Expand All @@ -38,7 +38,7 @@ docker run \
-v $HOME/.cargo/git:/root/.cargo/git \
-v $HOME/.cargo/registry:/root/.cargo/registry \
--entrypoint cargo \
fredrikfornwall/rust-static-builder:1.70.0 \
fredrikfornwall/rust-static-builder:1.80.1 \
test --target x86_64-unknown-linux-musl
```

Expand All @@ -49,7 +49,7 @@ By default the built binary will be stripped. Run with `-e NOSTRIP=1`, as in
docker run \
-e NOSTRIP=1 \
-v "$PWD":/build \
fredrikfornwall/rust-static-builder:1.70.0
fredrikfornwall/rust-static-builder:1.80.1
```

to disable stripping.
Expand Down

0 comments on commit 1289439

Please sign in to comment.