-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build kjob in docker to remove goland dependency. (#305)
* remove go dependency Signed-off-by: Piotr Pawłowski <ppawl@google.com> --------- Signed-off-by: Piotr Pawłowski <ppawl@google.com>
- Loading branch information
Showing
3 changed files
with
59 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
# Use a google-cloud-cli image as the base | ||
ARG BASE_IMAGE=gcr.io/google.com/cloudsdktool/google-cloud-cli:stable | ||
FROM ${BASE_IMAGE} | ||
|
||
# Install necessary tools and libraries | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
curl \ | ||
gnupg \ | ||
lsb-release \ | ||
git \ | ||
make \ | ||
unzip \ | ||
wget | ||
|
||
# Install Go | ||
ARG GO_VERSION=1.23.0 | ||
RUN wget -q "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" -O go.tar.gz && \ | ||
tar -C /usr/local -xzf go.tar.gz && \ | ||
rm go.tar.gz | ||
|
||
# Set GOPATH and add to PATH | ||
ENV GOPATH /go | ||
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin | ||
|
||
# Clone the kjob repository | ||
ARG KJOB_BRANCH=main | ||
RUN git clone --branch ${KJOB_BRANCH} https://github.com/kubernetes-sigs/kjob.git /kjob | ||
|
||
# Build the gcluster binary | ||
WORKDIR /kjob | ||
RUN make kubectl-kjob | ||
|