Skip to content

Commit 45348cf

Browse files
committed
Provide build-config example
Override the pip index url, which does not impact any of our other examples Signed-off-by: adelaney21 <[email protected]>
1 parent ff52326 commit 45348cf

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

base-images/build.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
ID_PREFIX="io.buildpacks.samples.stacks"
55

66
DEFAULT_PREFIX=cnbs/sample-base
7-
DEFAULT_PLATFORM=amd64
7+
DEFAULT_PLATFORM=linux/amd64
88

99
REPO_PREFIX=${DEFAULT_PREFIX}
1010
PLATFORM=${DEFAULT_PLATFORM}
@@ -63,17 +63,10 @@ BUILD_IMAGE=${REPO_PREFIX}-build:${TAG}
6363
FROM_IMAGE=$(head -n1 "${IMAGE_DIR}"/base/Dockerfile | cut -d' ' -f2)
6464

6565
# Get target distro information
66-
if cmd /c ver; then
67-
DISTRO_NAME=""
68-
RAW_VERSION=$(docker run --rm "${FROM_IMAGE}" cmd /c ver)
69-
DISTRO_VERSION=$(echo "$RAW_VERSION" | head -n1 | sed 's/Microsoft Windows //' | sed 's/[][]//g' | cut -d' ' -f2)
70-
echo "DISTRO_VERSION: ${DISTRO_VERSION}"
71-
else
7266
DISTRO_NAME=$(docker run --rm "${FROM_IMAGE}" cat /etc/os-release | grep '^ID=' | cut -d'=' -f2)
7367
echo "DISTRO_NAME: ${DISTRO_NAME}"
7468
DISTRO_VERSION=$(docker run --rm "${FROM_IMAGE}" cat /etc/os-release | grep '^VERSION_ID=' | cut -d'=' -f2)
7569
echo "DISTRO_VERSION: ${DISTRO_VERSION}"
76-
fi
7770

7871
if [[ -d "${IMAGE_DIR}/base" ]]; then
7972
docker build --platform=${PLATFORM} \

base-images/noble/build/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ RUN apt update && \
88

99
COPY ./bin/yj-linux /usr/local/bin/yj
1010

11+
COPY ./cnb/build-config/env/* /cnb/build-config/env/
12+
1113
# Create user and group
1214
ARG cnb_uid=1001
1315
ARG cnb_gid=1001
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://pypi.org/simple

0 commit comments

Comments
 (0)