Skip to content
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
10 changes: 7 additions & 3 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,13 @@ if [ -v GITHUB_ACTIONS ]; then
sudo sysctl --system
elif [ "${CONTAINER_TYPE}" == "docker" -o "${CONTAINER_TYPE}" == "podman" ]; then
if ! ${CONTAINER_TYPE} images riscvintl/udb:${CONTAINER_TAG} | grep -q udb ; then
# TODO: pull the image if it can be found
echo "Building ${CONTAINER_TYPE} image..."
${CONTAINER_TYPE} build -t riscvintl/udb:${CONTAINER_TAG} -f .devcontainer/Dockerfile .
echo "Image not found locally. Attempting to pull from registry..."
if ${CONTAINER_TYPE} pull docker.io/riscvintl/udb:${CONTAINER_TAG} 2>/dev/null; then
echo "Successfully pulled image from registry."
else
echo "Could not pull image from registry. Building locally..."
${CONTAINER_TYPE} build -t riscvintl/udb:${CONTAINER_TAG} -f .devcontainer/Dockerfile .
fi
fi
if [ ${CONTAINER_TYPE} == "podman" ]; then
# Podman requires extra flags to handle SELinux
Expand Down
Loading