Skip to content

Commit b10b75e

Browse files
authored
Merge pull request #529 from cloudfoundry/merge-jammy-into-noble
Merge Jammy fix "bundle install" permission error into Noble
2 parents 710ef9f + 2ac31b2 commit b10b75e

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

ci/docker/os-image-stemcell-builder/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ RUN meta4_cli_path="/usr/local/bin/meta4" \
9191
> "${meta4_cli_path}" \
9292
&& chmod +x "${meta4_cli_path}"
9393

94+
ENV GEM_HOME="${GEM_HOME}" \
95+
BUNDLE_APP_CONFIG="${GEM_HOME}" \
96+
BUNDLE_SILENCE_ROOT_WARNING=1
97+
ENV PATH="${GEM_HOME}/bin:${PATH}"
98+
9499
RUN cd /tmp \
95100
&& curl --show-error -sL "${RUBY_INSTALL_URL}" \
96101
| tar -xzf - \
@@ -103,9 +108,8 @@ RUN cd /tmp \
103108
&& ruby-install --jobs=${NUM_CPUS} --cleanup --system ruby ${RUBY_VERSION} \
104109
-- --disable-install-doc --disable-install-rdoc \
105110
&& gem update --system \
106-
&& bundle config --global path "${GEM_HOME}" \
107-
&& bundle config --global bin "${GEM_HOME}/bin"
108-
ENV PATH=${GEM_HOME}/bin:${PATH}
111+
&& mkdir -p "${GEM_HOME}/bin" \
112+
&& chown -R ubuntu:ubuntu "${GEM_HOME}"
109113

110114
RUN syft_cli_path="/usr/local/bin/syft" \
111115
&& curl --show-error -sL "${SYFT_CLI_URL}" \

ci/tasks/os-images/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fi
3333
sudo chown -R ubuntu .
3434
sudo chown -R ubuntu:ubuntu /mnt
3535
sudo chmod u+s "$(which sudo)"
36-
sudo --preserve-env --set-home --user ubuntu -- /bin/bash --login -i <<SUDO
3736
bundle install --local
37+
sudo --preserve-env --set-home --user ubuntu -- /bin/bash --login -i <<SUDO
3838
bundle exec rake stemcell:build_os_image[$OPERATING_SYSTEM_NAME,$OPERATING_SYSTEM_VERSION,$OS_IMAGE]
3939
SUDO

0 commit comments

Comments
 (0)