@@ -22,14 +22,14 @@ COPY .yarnrc.yml /root/.yarnrc.yml
22
22
RUN rm -f $(which yarn) || true
23
23
24
24
# Extract the correct version from the file and install
25
- RUN YARN_VERSION=$(awk -F'[-.]' '/yarnPath:/ {print $(NF-3)"."$(NF-2)"."$(NF-1)}' /root/.yarnrc.yml) \
26
- && echo "Detected Yarn Version: $YARN_VERSION" \
27
- && corepack enable \
28
- && corepack prepare "yarn@$YARN_VERSION" --activate \
29
- && yarn -v \
30
- && rm -f /root/.yarnrc.yml \
31
- && echo "export PATH=\"\$ HOME/.yarn/bin:\$ HOME/.config/yarn/global/node_modules/.bin:\$ PATH\" " >> /root/.bashrc \
32
- && echo 'echo "Yarn version: $(yarn -v)"' >> /root/.bashrc
25
+ RUN YARN_VERSION=$(awk -F'[-.]' '/yarnPath:/ {print $(NF-3)"."$(NF-2)"."$(NF-1)}' /root/.yarnrc.yml) && \
26
+ echo "Detected Yarn Version: $YARN_VERSION" && \
27
+ corepack enable && \
28
+ corepack prepare "yarn@$YARN_VERSION" --activate && \
29
+ yarn -v && \
30
+ rm -f /root/.yarnrc.yml && \
31
+ echo "export PATH=\"\$ HOME/.yarn/bin:\$ HOME/.config/yarn/global/node_modules/.bin:\$ PATH\" " >> /root/.bashrc && \
32
+ echo 'echo "Yarn version: $(yarn -v)"' >> /root/.bashrc
33
33
34
34
# Install essential dependencies and Node.js tools
35
35
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -43,13 +43,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
43
43
echo "Node: $(node -v)\n NPM: $(npm -v)\n Yarn: $(yarn -v)\n TypeScript: $(tsc -v)"
44
44
45
45
# Ensure the current user is root and verify permissions
46
- RUN echo "whoami: $(whoami)" \
46
+ RUN echo "whoami: $(whoami)" && \
47
47
# The "id" command should confirm the user is root
48
- && id \
48
+ id && \
49
49
# Make the "/root" folder readable for all users
50
- && chmod 755 /root \
50
+ chmod 755 /root && \
51
51
# Check where Node.js loads required modules
52
- && node -p 'module.paths'
52
+ node -p 'module.paths'
53
53
54
54
# Install Helm, OpenShift CLI, ocm-cli, and yq
55
55
RUN curl -fsSL -o /tmp/helm.tar.gz "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz" && \
0 commit comments