Skip to content

Commit ff7f3a4

Browse files
committed
dockerfile: remove duplicated SSLIB arg statement
SSL library is configured via Dockerfile through an ARG statement. Previously, it was repeated through each build stage. Remove duplicated default value by using a global arg and import it without any value set in the different build stages. This solution has been found on the below stackoverflow.com issue. https://stackoverflow.com/questions/53681522/share-variable-in-multi-stage-dockerfile-arg-before-from-not-substituted/53683625
1 parent a975649 commit ff7f3a4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
FROM ubuntu:20.04 AS builder-ssl
21
ARG SSLLIB=QuicTLS-1.1.1
32

3+
FROM ubuntu:20.04 AS builder-ssl
4+
ARG SSLLIB
5+
46
# combined list of dependencies for QuicTLS, AWS-LC
57
ENV DEBIAN_FRONTEND noninteractive
68
RUN apt-get -y update && apt-get -y install git g++ make gcc wget autoconf libtool cmake curl libasan5
@@ -21,7 +23,7 @@ RUN if [ "$SSLLIB" = "QuicTLS-1.1.1" ]; \
2123
fi
2224

2325
FROM ubuntu:20.04 AS builder
24-
ARG SSLLIB=QuicTLS-1.1.1
26+
ARG SSLLIB
2527

2628
COPY --from=builder-ssl /usr/local/include/openssl/ /usr/local/include/openssl/
2729
COPY --from=builder-ssl \
@@ -54,7 +56,7 @@ RUN apt-get -y update && apt-get -y install git make gcc liblua5.3-0 liblua5.3-d
5456
&& make install
5557

5658
FROM martenseemann/quic-network-simulator-endpoint:latest
57-
ARG SSLLIB=QuicTLS-1.1.1
59+
ARG SSLLIB
5860

5961
# Required for lighttpd
6062
ENV TZ=Europe/Paris

0 commit comments

Comments
 (0)