This is an automated email from the ASF dual-hosted git repository.

shamrick pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 14007e3cea Update Trafficserver Alpine image to 9.2.4 (#7994)
14007e3cea is described below

commit 14007e3cea2cc862dccd345ac91209c0cc7fdf85
Author: Zach Hoffman <[email protected]>
AuthorDate: Thu Jul 18 20:44:13 2024 -0600

    Update Trafficserver Alpine image to 9.2.4 (#7994)
    
    * No substitution in the name
    
    * Download ATS from the Apache archive
    
    download.apache.org only contains currently-supported releases.
    
    * Use Alpine main repo version 3.16 for adding package libexecinfo-dev
    
    Alpine versions above 3.16 do not contain package libexecinfo-dev, which
    ATS needs.
    
    Alpine 3.19 still fails for unknown reasons, but Alpine 3.18 builds with
    this fix.
    
    * Set default for GITHUB_REPOSITORY
    
    * Update Apache Traffic Server to 9.2.4
---
 .env                                               |  2 +-
 .github/containers/trafficserver-alpine/Dockerfile | 28 ++++++++++++++++------
 .../trafficserver-alpine/docker-compose.yml        |  2 +-
 .../workflows/container-trafficserver-alpine.yml   |  2 +-
 4 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/.env b/.env
index 9f9014e842..d53fc8c7d7 100644
--- a/.env
+++ b/.env
@@ -1,3 +1,3 @@
-ATS_VERSION=9.1.2
+ATS_VERSION=9.2.4
 GO_VERSION=1.22.5
 TOMCAT_VERSION=9.0.91
diff --git a/.github/containers/trafficserver-alpine/Dockerfile 
b/.github/containers/trafficserver-alpine/Dockerfile
index 9efce0a9b8..6ce641c268 100644
--- a/.github/containers/trafficserver-alpine/Dockerfile
+++ b/.github/containers/trafficserver-alpine/Dockerfile
@@ -15,15 +15,15 @@
 # specific language governing permissions and limitations
 # under the License.
 
-FROM alpine:latest AS build-trafficserver
+FROM alpine:3.18 AS build-trafficserver
 ARG ATS_VERSION
-ADD 
https://downloads.apache.org/trafficserver/trafficserver-${ATS_VERSION}.tar.bz2 
/tmp/
+ADD 
https://archive.apache.org/dist/trafficserver/trafficserver-${ATS_VERSION}.tar.bz2
 /tmp/
 RUN set -o errexit -o nounset -o xtrace; \
     cd tmp; \
     dirname=trafficserver-${ATS_VERSION}; \
     tar xf ${dirname}.tar.bz2; \
     rm ${dirname}.tar.bz2; \
-    apk add --no-cache \
+    apk add --update --no-cache \
         # configure dependencies
         g++ \
         perl \
@@ -31,11 +31,20 @@ RUN set -o errexit -o nounset -o xtrace; \
         pcre-dev \
         make \
         # build dependencies
-        libexecinfo-dev \
         fortify-headers \
         linux-headers \
         zlib-dev; \
+    # Alpine versions above 3.16 do not contain package libexecinfo-dev,
+    # which ATS needs.
+    # 
https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/issues/68#issuecomment-1571877109
+    apk add --update --no-cache \
+        --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main/ \
+        libexecinfo-dev; \
     cd $dirname; \
+    # Fix is from 
https://github.com/apache/trafficserver-ingress-controller/pull/151
+    sed -i 
's/PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP/PTHREAD_RWLOCK_INITIALIZER/'
 \
+        include/tscore/ink_rwlock.h \
+        include/tscpp/util/TsSharedMutex.h; \
     ./configure \
         --disable-tests \
         --enable-experimental-plugins \
@@ -52,13 +61,18 @@ RUN set -o errexit -o nounset -o xtrace; \
     cd ..; \
     rm -r $dirname
 
-FROM alpine:latest
+FROM alpine:3.18
 COPY --from=build-trafficserver /tmp/built/ /
-RUN apk add --no-cache \
+RUN apk add --update --no-cache \
         # runtime dependencies
-        libexecinfo \
         libstdc++ \
         pcre && \
+    # Alpine versions above 3.16 do not contain package libexecinfo,
+    # which ATS needs.
+    # 
https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/issues/68#issuecomment-1571877109
+    apk add --update --no-cache \
+        --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main/ \
+        libexecinfo && \
     adduser -D ats
 USER ats
 CMD /bin/traffic_server
diff --git a/.github/containers/trafficserver-alpine/docker-compose.yml 
b/.github/containers/trafficserver-alpine/docker-compose.yml
index df0ac1f441..321ddc570c 100644
--- a/.github/containers/trafficserver-alpine/docker-compose.yml
+++ b/.github/containers/trafficserver-alpine/docker-compose.yml
@@ -42,4 +42,4 @@ services:
           - linux/amd64
           - linux/arm64
     # for example, ghcr.io/apache/trafficcontrol/ci/trafficserver-alpine:9.1.2
-    image: 
${CONTAINER:-ghcr.io/${GITHUB_REPOSITORY}/ci/trafficserver-alpine}:${ATS_VERSION}
+    image: 
${CONTAINER:-ghcr.io/${GITHUB_REPOSITORY:-apache/trafficcontrol}/ci/trafficserver-alpine}:${ATS_VERSION}
diff --git a/.github/workflows/container-trafficserver-alpine.yml 
b/.github/workflows/container-trafficserver-alpine.yml
index d59afc24d3..2ed1669ea6 100644
--- a/.github/workflows/container-trafficserver-alpine.yml
+++ b/.github/workflows/container-trafficserver-alpine.yml
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Container ghcr.io/${{ github.repository }}/ci/trafficserver-alpine
+name: Container trafficserver-alpine
 
 env:
   CONTAINER: ghcr.io/${{ github.repository }}/ci/trafficserver-alpine

Reply via email to