Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
51b4cd7e
Unverified
Commit
51b4cd7e
authored
Sep 22, 2025
by
Julien Mancuso
Committed by
GitHub
Sep 22, 2025
Browse files
feat: replace Earthly (#2154)
Signed-off-by:
Julien Mancuso
<
jmancuso@nvidia.com
>
parent
5fc0bf92
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
1 deletion
+80
-1
Earthfile
Earthfile
+8
-0
deploy/cloud/operator/Dockerfile
deploy/cloud/operator/Dockerfile
+55
-0
deploy/cloud/operator/Earthfile
deploy/cloud/operator/Earthfile
+8
-0
docs/guides/dynamo_deploy/installation_guide.md
docs/guides/dynamo_deploy/installation_guide.md
+9
-1
No files found.
Earthfile
View file @
51b4cd7e
...
@@ -13,6 +13,14 @@
...
@@ -13,6 +13,14 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
#######################################################################
# 🚨 DEPRECATION NOTICE 🚨
#
# This Earthfile is being replaced by docker
# This file is kept temporarily for backward compatibility but will
# be removed in a future release. Please migrate to the new system.
#######################################################################
VERSION 0.8
VERSION 0.8
############### ARTIFACTS TARGETS ##############################
############### ARTIFACTS TARGETS ##############################
...
...
deploy/cloud/operator/Dockerfile
0 → 100644
View file @
51b4cd7e
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# Base stage - Common setup for all stages
FROM
golang:1.24 AS base
# Docker buildx automatically provides these
ARG
TARGETOS=linux
ARG
TARGETARCH=amd64
RUN
echo
"Building for
${
TARGETOS
}
/
${
TARGETARCH
}
"
# Install common dependencies
RUN
apt-get update
&&
apt-get
install
-y
git
&&
apt-get clean
&&
rm
-rf
/var/lib/apt/lists/
*
WORKDIR
/workspace
# Copy go mod and sum files first for better layer caching
COPY
go.mod go.sum ./
RUN
go mod download
# Copy source code
COPY
. .
# Lint stage
FROM
base AS linter
# Install golangci-lint using go install (builds with current Go version)
RUN
go
install
github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2
# Run linting
RUN
golangci-lint run
--timeout
=
5m
# Test stage
FROM
base AS tester
# Install make if not present
RUN
apt-get update
&&
apt-get
install
-y
make
&&
apt-get clean
&&
rm
-rf
/var/lib/apt/lists/
*
# Run tests using Makefile
RUN
make
test
# Build stage - depends on successful lint and test
FROM
base AS builder
# Build the binary
RUN
CGO_ENABLED
=
0
GOOS
=
${
TARGETOS
}
GOARCH
=
${
TARGETARCH
}
go build
-o
manager ./cmd/main.go
# Runtime stage
FROM
nvcr.io/nvidia/distroless/go:v3.1.12
WORKDIR
/
COPY
--from=builder /workspace/manager .
USER
65532:65532
ENTRYPOINT
["./manager"]
deploy/cloud/operator/Earthfile
View file @
51b4cd7e
...
@@ -13,6 +13,14 @@
...
@@ -13,6 +13,14 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
#######################################################################
# 🚨 DEPRECATION NOTICE 🚨
#
# This Earthfile for the operator is being replaced by docker
# This file is kept temporarily for backward compatibility but will
# be removed in a future release. Please migrate to the new system.
#######################################################################
VERSION 0.8
VERSION 0.8
# Base container for both build and test
# Base container for both build and test
...
...
docs/guides/dynamo_deploy/installation_guide.md
View file @
51b4cd7e
...
@@ -100,7 +100,15 @@ export IMAGE_TAG=${RELEASE_VERSION}
...
@@ -100,7 +100,15 @@ export IMAGE_TAG=${RELEASE_VERSION}
# 2. Build operator
# 2. Build operator
cd
deploy/cloud/operator
cd
deploy/cloud/operator
earthly
--push
+docker
--DOCKER_SERVER
=
$DOCKER_SERVER
--IMAGE_TAG
=
$IMAGE_TAG
# 2.1 Alternative 1 : Build and push the operator image for multiple platforms
docker buildx create
--name
multiplatform
--driver
docker-container
--bootstrap
docker buildx use multiplatform
docker buildx build
--platform
linux/amd64,linux/arm64
-t
$DOCKER_SERVER
/dynamo-operator:
$IMAGE_TAG
--push
.
# 2.2 Alternative 2 : Build and push the operator image for a single platform
docker build
-t
$DOCKER_SERVER
/dynamo-operator:
$IMAGE_TAG
.
&&
docker push
$DOCKER_SERVER
/dynamo-operator:
$IMAGE_TAG
cd
-
cd
-
# 3. Create namespace and secrets to be able to pull the operator image
# 3. Create namespace and secrets to be able to pull the operator image
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment