Skip to content
Open
Show file tree
Hide file tree
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
17 changes: 10 additions & 7 deletions images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ RUN --mount=type=cache,id=go-cache,target=/root/.cache/go-build,sharing=shared \
set -eux

if ${IS_NONRELEASE_BUILD}; then
goreleaser build --clean --single-target --snapshot
goreleaser build --id pelican-server --clean --single-target --snapshot
else
goreleaser build --clean --single-target
goreleaser build --id pelican-server --clean --single-target
fi

# NOTE (brianaydemir): GoReleaser creates a dist directory whose path
Expand Down Expand Up @@ -208,7 +208,7 @@ RUN --mount=type=cache,id=dnf-${TARGETPLATFORM},target=/var/cache/dnf,sharing=lo

printf '%s\n' "metadata_expire=1800" >> /etc/dnf/dnf.conf

dnf install -y tini 'dnf-command(versionlock)'
dnf install -y tini 'dnf-command(versionlock)' python3-pip

mkdir -p /etc/pelican/config.d
mkdir -p /usr/share/pelican/config.d
Expand Down Expand Up @@ -531,13 +531,14 @@ ENV JAVA_HOME="/usr/lib/jvm/jre" \
#################################################################
# Pelican Director
#################################################################
FROM pelican-software-base AS director
FROM pelican-software-base AS director-base
RUN python3 -m pip install --no-cache-dir geoip2

FROM director-base AS director
ARG TARGETOS TARGETARCH
COPY --from=pelican-build /pelican-build/dist/${TARGETOS}_${TARGETARCH}/pelican-server_${TARGETOS}_${TARGETARCH}/pelican-server /usr/local/sbin/pelican-server
COPY images/entrypoint.sh /entrypoint.sh
COPY scripts/geoquery.py /usr/local/sbin/geoquery
RUN dnf install -y python3-pip \
&& python3 -m pip install geoip2
ENTRYPOINT ["/entrypoint.sh", "pelican-server", "director"]
CMD ["serve"]

Expand Down Expand Up @@ -573,7 +574,7 @@ CMD ["serve"]

FROM origin AS osdf-origin
ARG TARGETPLATFORM
RUN --mount=type=cache,id=dnf-${TARGETPLATFORM},target=/var/cache/dnf,sharing=locked <<ENDRUN
RUN <<ENDRUN
set -eux

# These IDs must match OSG's sssd sidecar containers.
Expand Down Expand Up @@ -709,10 +710,12 @@ RUN --mount=type=cache,id=dnf-${TARGETPLATFORM},target=/var/cache/dnf,sharing=lo
gdb \
gcc-c++ \
git \
graphviz \
jq \
make \
nano \
procps \
psmisc \
python3-pip \
systemd \
valgrind \
Expand Down
20 changes: 16 additions & 4 deletions images/dev-container-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# ***************************************************************
#
# Copyright (C) 2024, Pelican Project, Morgridge Institute for Research
# Copyright (C) 2025, Pelican Project, Morgridge Institute for Research
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You may
Expand All @@ -17,10 +17,22 @@
#
# ***************************************************************

# Run pre-commit install
pre-commit install
# Add additional CAs and certificates to the trust store.
if [ -d /certs ]; then
shopt -s nullglob
for ca_cert in /certs/*.crt; do
cp "${ca_cert}" /etc/pki/ca-trust/source/anchors/
done
update-ca-trust extract
shopt -u nullglob
fi

# Install the pre-commit hook.
if [ -d ./.git ]; then
pre-commit install
fi

# Default to bash but if a command is passed, run it
# Default to bash but if a command is passed, run it.
if [ $# -eq 0 ]; then
exec /bin/bash
else
Expand Down
12 changes: 11 additions & 1 deletion images/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# ***************************************************************
#
# Copyright (C) 2024, Pelican Project, Morgridge Institute for Research
# Copyright (C) 2025, Pelican Project, Morgridge Institute for Research
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You may
Expand All @@ -20,6 +20,16 @@

# Usage: entrypoint.sh [osdf|pelican] [daemon name] [args...]

# Add additional CAs and certificates to the trust store.
if [ -d /certs ]; then
shopt -s nullglob
for ca_cert in /certs/*.crt; do
cp "${ca_cert}" /etc/pki/ca-trust/source/anchors/
done
update-ca-trust extract
shopt -u nullglob
fi

# Set up OA4MP only if this is an origin.
if [ "$2" == "origin" ]; then
####
Expand Down
Loading