Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kie-issues#755: Update image ENV vars to make GO_PATH available for non interactive shell #1151

Merged
merged 1 commit into from
Jan 9, 2024
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
16 changes: 10 additions & 6 deletions apache-nodes/Dockerfile.kogito-ci-build
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ RUN wget https://go.dev/dl/go1.19.10.linux-amd64.tar.gz -P /tmp && \
sudo chown -R nonrootuser:nonrootuser /opt/golang/go && \
sudo chmod -R 755 /opt/golang/go && \
echo 'export GOPATH=${HOME}/go' | sudo tee /etc/profile.d/go.sh && \
echo 'export PATH=${PATH}:/opt/golang/go/bin:${GOPATH}/bin' | sudo tee -a /etc/profile.d/go.sh && \
echo "source /etc/profile.d/go.sh" >> $HOME/.bashrc && \
rm -rf /tmp/go* && \
sudo update-alternatives --install /usr/local/bin/go go /opt/golang/go/bin/go 1
sudo update-alternatives --install /usr/local/bin/go go /opt/golang/go/bin/go 1 && \
go install golang.org/x/tools/cmd/goimports@latest && \
sudo update-alternatives --install /usr/local/bin/goimports goimports ~/go/bin/goimports 1

# Install hub CLI (used for GitHub api operations)
RUN wget https://github.com/mislav/hub/releases/download/v2.14.2/hub-linux-amd64-2.14.2.tgz -O /tmp/hub.tgz && \
Expand Down Expand Up @@ -142,15 +145,16 @@ RUN wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest-4.13/o
RUN sudo bash -c 'echo -e "#!/bin/bash\nupdate-alternatives \"\$@\"" > /usr/local/bin/alternatives' \
&& sudo chmod +x /usr/local/bin/alternatives

ENV HOME="/home/nonrootuser/"
ENV HOME="/home/nonrootuser"

ENV JAVA_HOME="/home/nonrootuser/.sdkman/candidates/java/current/"
ENV MAVEN_HOME="/home/nonrootuser/.sdkman/candidates/maven/current/"
ENV JAVA_HOME="${HOME}/.sdkman/candidates/java/current/"
ENV MAVEN_HOME="${HOME}/.sdkman/candidates/maven/current/"
ENV MAVEN_OPTS="-Xms1024m -Xmx12g"
ENV NODE_HOME="/home/nonrootuser/.nvm/versions/node/v16.20.0"
ENV NODE_HOME="${HOME}/.nvm/versions/node/v16.20.0"
ENV NODE_OPTIONS="--max_old_space_size=4096"
ENV GOPATH="/home/nonrootuser/go"
ENV GOPATH="${HOME}/go"
ENV GOROOT="/opt/golang/go"
ENV PATH="${PATH}:${GOROOT}/bin:${GOPATH}/bin"

ENV CONTAINER_ENGINE="docker"
ENV CONTAINER_ENGINE_TLS_OPTIONS=""
Expand Down