Skip to content

Commit 0d952c3

Browse files
authored
Merge pull request #7850 from bandi13/dockerfileFixes
Dockerfile fixes
2 parents 656ba24 + edb95ae commit 0d952c3

3 files changed

Lines changed: 29 additions & 8 deletions

File tree

Docker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ RUN cd /opt/sources && git clone --single-branch https://github.com/cisco/hash-s
4040

4141
# Install pkixssh to /opt/pkixssh for X509 interop testing with wolfSSH
4242
RUN mkdir /var/empty
43-
RUN cd /opt/sources && wget -q -O- https://roumenpetrov.info/secsh/src/pkixssh-14.1.1.tar.gz | tar xzf - && cd pkixssh-14.1.1 && ./configure --prefix=/opt/pkixssh/ --exec-prefix=/opt/pkixssh/ && make install
43+
RUN cd /opt/sources && wget -q -O- https://roumenpetrov.info/secsh/src/pkixssh-15.1.tar.gz | tar xzf - && cd pkixssh-15.1 && ./configure --prefix=/opt/pkixssh/ --exec-prefix=/opt/pkixssh/ && make install
4444

4545
# Install udp/tcp-proxy
4646
RUN cd /opt/sources && git clone --depth=1 --single-branch --branch=main http://github.com/wolfssl/udp-proxy && cd udp-proxy && make && cp tcp_proxy udp_proxy /bin/.
47+
# Install libbacktrace
48+
RUN cd /opt/sources && git clone --depth=1 --single-branch https://github.com/ianlancetaylor/libbacktrace.git && cd libbacktrace && mkdir build && cd build && ../configure && make && make install
4749

4850
# Allow non-root to use tcpdump (will need NET_RAW and NET_ADMIN capability when running the container)
4951
RUN setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/tcpdump

Docker/buildAndPush.sh

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,37 @@ docker build -t wolfssl/wolfssl-builder:${CUR_DATE} ${DOCKER_BUILD_OPTIONS} "${W
1818
docker tag wolfssl/testing-cross-compiler:${CUR_DATE} wolfssl/testing-cross-compiler:latest
1919

2020
if [ $? -eq 0 ]; then
21-
echo "Pushing containers to DockerHub"
22-
docker push wolfssl/wolfssl-builder:${CUR_DATE} && docker push wolfssl/wolfssl-builder:latest && \
23-
docker push wolfssl/testing-cross-compiler:${CUR_DATE} && docker push wolfssl/testing-cross-compiler:latest
21+
echo "Push containers to DockerHub [y/N]? "
22+
read val
23+
if [ "$val" = "y" ]; then
24+
docker push wolfssl/wolfssl-builder:${CUR_DATE} && docker push wolfssl/wolfssl-builder:latest && \
25+
docker push wolfssl/testing-cross-compiler:${CUR_DATE} && docker push wolfssl/testing-cross-compiler:latest
26+
if [ $? -ne 0 ]; then
27+
echo "Warning: push failed. Continuing"
28+
((NUM_FAILURES++))
29+
fi
30+
fi
2431
else
2532
echo "Warning: Build wolfssl/wolfssl-builder failed. Continuing"
2633
((NUM_FAILURES++))
2734
fi
2835

2936
echo "Building wolfssl/wolfCLU:${CUR_DATE}"
30-
docker buildx build --pull --push --build-arg DUMMY=${CUR_DATE} -t wolfssl/wolfclu:${CUR_DATE} --platform=linux/amd64,linux/arm64,linux/arm/v7 "${WOLFSSL_DIR}/Docker/wolfCLU" && \
31-
docker buildx build --pull --push --build-arg DUMMY=${CUR_DATE} -t wolfssl/wolfclu:latest --platform=linux/amd64,linux/arm64,linux/arm/v7 "${WOLFSSL_DIR}/Docker/wolfCLU"
32-
if [ $? -ne 0 ]; then
37+
DOCKER_ARGS="--pull --build-arg DUMMY=${CUR_DATE} --platform=linux/amd64,linux/arm64,linux/arm/v7 ${WOLFSSL_DIR}/Docker/wolfCLU"
38+
docker buildx build -t wolfssl/wolfclu:${CUR_DATE} ${DOCKER_ARGS} && \
39+
docker buildx build -t wolfssl/wolfclu:latest ${DOCKER_ARGS}
40+
if [ $? -eq 0 ]; then
41+
echo "Push containers to DockerHub [y/N]? "
42+
read val
43+
if [ "$val" = "y" ]; then
44+
docker buildx build ${DOCKER_ARGS} --push -t wolfssl/wolfclu:${CUR_DATE} && \
45+
docker buildx build ${DOCKER_ARGS} --push -t wolfssl/wolfclu:latest
46+
if [ $? -ne 0 ]; then
47+
echo "Warning: push failed. Continuing"
48+
((NUM_FAILURES++))
49+
fi
50+
fi
51+
else
3352
echo "Warning: Build wolfssl/wolfclu failed. Continuing"
3453
((NUM_FAILURES++))
3554
fi

Docker/wolfCLU/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ubuntu as BUILDER
33

44
ARG DEPS_WOLFSSL="build-essential autoconf libtool zlib1g-dev libuv1-dev libpam0g-dev git libpcap-dev libcurl4-openssl-dev bsdmainutils netcat-traditional iputils-ping bubblewrap"
55
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \
6-
&& apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} \
6+
&& apt install -y ${DEPS_WOLFSSL} \
77
&& apt clean -y && rm -rf /var/lib/apt/lists/*
88

99
ARG NUM_CPU=16

0 commit comments

Comments
 (0)