Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump shibboleth-sp-nginx to Debian 12 #181

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions docker/shibboleth-sp-nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
# Build stage
FROM debian:buster-slim AS build

ENV NGINX_VERSION=1.18.0-2~buster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait just curious why do we no longer need this lol

Copy link
Contributor Author

@mureytasroc mureytasroc Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly bc I don't know what the most recent version of nginx in that repository is and don't see why we need to pin to a specific Nginx version if the docker image is basically never rebuilt anyway. Seems like it will just make it harder to update in the future.

Maybe there's some reason why it's important to pin the version of nginx like that?

FROM debian:bookworm-slim AS build

# Install dependencies
RUN apt-get update \
&& apt-get install --no-install-recommends -y gnupg2 ca-certificates wget git mercurial build-essential lsb-release devscripts fakeroot quilt libssl-dev libpcre3-dev zlib1g-dev debhelper libxml2-utils xsltproc \
&& apt-get install --no-install-recommends -y gnupg2 ca-certificates wget git mercurial build-essential lsb-release devscripts fakeroot quilt libssl-dev libpcre2-dev libpcre3-dev zlib1g-dev debhelper libxml2-utils xsltproc \
&& rm -rf /var/lib/apt/lists/*

# Add Nginx repository and install
RUN wget -qO - https://nginx.org/keys/nginx_signing.key | apt-key add - \
&& echo "deb http://nginx.org/packages/debian/ buster nginx" > /etc/apt/sources.list.d/nginx.list \
&& apt-get update && apt-get install --no-install-recommends -y nginx=$NGINX_VERSION \
&& echo "deb http://nginx.org/packages/debian/ bookworm nginx" > /etc/apt/sources.list.d/nginx.list \
&& apt-get update && apt-get install --no-install-recommends -y nginx \
&& rm -rf /var/lib/apt/lists/*

# Install pkg-oss
Expand All @@ -26,25 +24,21 @@ RUN pkg-oss/build_module.sh --skip-depends -y -o /root/nginx-modules/deb/ -n shi
&& rm -f /root/nginx-modules/deb/*-dbg_*.deb

# Production stage
FROM debian:buster-slim
FROM debian:bookworm-slim

LABEL maintainer="Penn Labs"

ENV NGINX_VERSION=1.18.0-2~buster

# Install dependencies
RUN apt-get update \
&& apt-get install --no-install-recommends -y gnupg2 wget ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Add Shibboleth and Nginx repositories
RUN wget -qO - http://pkg.switch.ch/switchaai/SWITCHaai-swdistrib.asc | apt-key add - \
&& wget -qO - https://nginx.org/keys/nginx_signing.key | apt-key add - \
&& echo "deb http://pkg.switch.ch/switchaai/debian/ buster main" > /etc/apt/sources.list.d/switch-shibboleth.list \
&& echo "deb http://nginx.org/packages/debian/ buster nginx" > /etc/apt/sources.list.d/nginx.list
# Add Nginx repository
RUN wget -qO - https://nginx.org/keys/nginx_signing.key | apt-key add - \
&& echo "deb http://nginx.org/packages/debian/ bookworm nginx" > /etc/apt/sources.list.d/nginx.list

# Install Shibboleth, Nginx, and Supervisor
RUN apt-get update && apt-get install --no-install-recommends -y shibboleth=3.0.4+switchaai2~buster1 supervisor nginx=$NGINX_VERSION \
RUN apt-get update && apt-get install --no-install-recommends -y libapache2-mod-shib supervisor nginx \
&& rm -rf /var/lib/apt/lists/*

# Install Nginx modules
Expand Down
Loading