Skip to content

Commit

Permalink
Update Trafficserver Alpine image to 9.2.4 (apache#7994)
Browse files Browse the repository at this point in the history
* 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

(cherry picked from commit 14007e3)
  • Loading branch information
zrhoffman authored and rimashah25 committed Sep 27, 2024
1 parent b5c90d0 commit 6a6428a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
28 changes: 21 additions & 7 deletions .github/containers/trafficserver-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,36 @@
# 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 \
openssl-dev \
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 \
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/containers/trafficserver-alpine/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ services:
- linux/amd64
- linux/arm64
# for example, ghcr.io/apache/trafficcontrol/ci/trafficserver-alpine:9.1.2
image: ${CONTAINER:-ghcr.io/apache/trafficcontrol/ci/trafficserver-alpine}:${ATS_VERSION}
image: ${CONTAINER:-ghcr.io/${GITHUB_REPOSITORY:-apache/trafficcontrol}/ci/trafficserver-alpine}:${ATS_VERSION}
2 changes: 1 addition & 1 deletion .github/workflows/container-trafficserver-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

name: Container ghcr.io/apache/trafficcontrol/ci/trafficserver-alpine
name: Container trafficserver-alpine

env:
CONTAINER: ghcr.io/${{ github.repository }}/ci/trafficserver-alpine
Expand Down

0 comments on commit 6a6428a

Please sign in to comment.