Skip to content

Commit 3411f40

Browse files
committed
remove created label and s/heredoc/eof
(personally prefer the standard eof marker for heredocs) Signed-off-by: clux <sszynrae@gmail.com>
1 parent d442ed1 commit 3411f40

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

Dockerfile

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ SHELL ["/bin/bash", "-eux", "-o", "pipefail", "-c"]
1717
# - file - needed by rustup.sh install
1818
# - automake autoconf libtool - support crates building C deps as part cargo build
1919
# NB: does not include cmake atm
20-
RUN <<HEREDOC
20+
RUN <<EOF
2121
apt-get update
2222
apt-get install --no-install-recommends -y \
2323
musl-dev \
@@ -38,11 +38,11 @@ RUN <<HEREDOC
3838
unzip
3939

4040
rm -rf /var/lib/apt/lists/*
41-
HEREDOC
41+
EOF
4242

4343
# Install a more recent release of protoc:
4444
ARG PROTOBUF_VER="31.0"
45-
RUN <<HEREDOC
45+
RUN <<EOF
4646
if [[ ${DOCKER_TARGET_ARCH} == 'aarch64' ]]; then
4747
DOCKER_TARGET_ARCH=aarch_64
4848
fi
@@ -52,15 +52,15 @@ RUN <<HEREDOC
5252

5353
unzip -j -d /usr/local/bin protoc.zip bin/protoc
5454
rm -rf protoc.zip
55-
HEREDOC
55+
EOF
5656

5757
# Install prebuilt sccache based on platform:
5858
ARG SCCACHE_VER="0.10.0"
59-
RUN <<HEREDOC
59+
RUN <<EOF
6060
ASSET_NAME="sccache-v${SCCACHE_VER}-${DOCKER_TARGET_ARCH}-unknown-linux-musl"
6161
curl -fsSL "https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VER}/${ASSET_NAME}.tar.gz" \
6262
| tar -xz -C /usr/local/bin --strip-components=1 --no-same-owner "${ASSET_NAME}/sccache"
63-
HEREDOC
63+
EOF
6464

6565
# Convenience list of variables for later compilation stages.
6666
# This helps continuing manually if anything breaks.
@@ -72,7 +72,7 @@ ENV CC=musl-gcc \
7272
FROM base AS build-zlib
7373
ARG ZLIB_VER="1.3.1"
7474
WORKDIR /src/zlib
75-
RUN <<HEREDOC
75+
RUN <<EOF
7676
curl -fsSL "https://zlib.net/zlib-${ZLIB_VER}.tar.gz" | tar -xz --strip-components=1
7777

7878
export CC="musl-gcc -fPIC -pie"
@@ -81,21 +81,21 @@ RUN <<HEREDOC
8181

8282
./configure --static --prefix="${PREFIX}"
8383
make -j$(nproc) && make install
84-
HEREDOC
84+
EOF
8585

8686
# Build libsqlite3 using same configuration as the alpine linux main/sqlite package
8787
FROM base AS build-sqlite
8888
ARG SQLITE_VER="3490200"
8989
WORKDIR /src/sqlite
90-
RUN <<HEREDOC
90+
RUN <<EOF
9191
curl -fsSL "https://www.sqlite.org/2025/sqlite-autoconf-${SQLITE_VER}.tar.gz" | tar -xz --strip-components=1
9292

9393
export CC="musl-gcc -fPIC -pie"
9494
export CFLAGS="-DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_ENABLE_RTREE -DSQLITE_USE_URI -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1"
9595

9696
./configure --prefix="${PREFIX}" --host=x86_64-unknown-linux-musl --enable-threadsafe --disable-shared
9797
make && make install
98-
HEREDOC
98+
EOF
9999

100100
# Install rust using rustup
101101
FROM base AS install-rustup
@@ -108,7 +108,7 @@ ARG RUSTUP_VER="1.28.2"
108108
# Uses `--no-modify-path` as `PATH` is set explicitly
109109
ENV RUSTUP_HOME=/opt/rustup
110110
ENV CARGO_HOME=/opt/cargo
111-
RUN <<HEREDOC
111+
RUN <<EOF
112112
RUST_ARCH="${DOCKER_TARGET_ARCH}-unknown-linux-gnu"
113113
curl -fsSL -o rustup-init "https://static.rust-lang.org/rustup/archive/${RUSTUP_VER}/${RUST_ARCH}/rustup-init"
114114
chmod +x rustup-init
@@ -121,7 +121,7 @@ RUN <<HEREDOC
121121
--target "${DOCKER_TARGET_ARCH}-unknown-linux-musl"
122122

123123
rm rustup-init
124-
HEREDOC
124+
EOF
125125

126126
FROM base AS release
127127
COPY --link --from=install-rustup /opt /opt
@@ -154,7 +154,6 @@ ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C link-self-contained=ye
154154
WORKDIR /volume
155155

156156
LABEL org.opencontainers.image.authors="Eirik Albrigtsen <sszynrae@gmail.com>"
157-
#LABEL org.opencontainers.image.create="$(date --utc --iso-8601=seconds)"
158157
LABEL org.opencontainers.image.documentation="https://github.com/clux/muslrust"
159158
LABEL org.opencontainers.image.licenses="MIT"
160159
LABEL org.opencontainers.image.url="https://github.com/clux/muslrust"

0 commit comments

Comments
 (0)