Skip to content

Commit 80bb52b

Browse files
committed
[comment] split build and copying
1 parent 6b79939 commit 80bb52b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

curl.dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
ARG TARGETARCH
44
ARG APP_ROOT
55
ARG APP_VERSION
6+
ENV BUILD_ROOT=/curl-${APP_VERSION}
67
ENV CC=clang
78
USER root
89

@@ -27,7 +28,7 @@
2728
tar xzf curl-${APP_VERSION}.tar.gz;
2829

2930
RUN set -ex; \
30-
cd /curl-${APP_VERSION}; \
31+
cd ${BUILD_ROOT}; \
3132
LDFLAGS="-static" PKG_CONFIG="pkg-config --static" \
3233
./configure \
3334
--disable-shared \
@@ -40,7 +41,10 @@
4041
--disable-manual \
4142
--without-libpsl; \
4243
make -j$(nproc) V=1 LDFLAGS="-static -all-static"; \
43-
strip src/curl; \
44+
strip src/curl;
45+
46+
RUN set -ex; \
47+
cd ${BUILD_ROOT}; \
4448
mkdir -p ${APP_ROOT}/usr/local/bin; \
4549
cp ./src/curl ${APP_ROOT}/usr/local/bin;
4650

0 commit comments

Comments
 (0)