Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 8 additions & 2 deletions kubelet-to-gcm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@
# 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.
FROM --platform=$BUILDPLATFORM golang:1.24 AS builder
ARG TARGETOS
ARG TARGETARCH
WORKDIR /workspace/
COPY . /workspace/
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -mod=vendor -a -o /output/monitor monitor/main/daemon.go

FROM --platform=$TARGETPLATFORM gcr.io/distroless/static:latest
FROM gcr.io/distroless/static:latest

COPY build/monitor /
COPY --from=builder /output/monitor /

# nobody:nobody
USER 65534:65534
Expand Down
3 changes: 0 additions & 3 deletions kubelet-to-gcm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ push-multiarch: $(addprefix .sub-push-,$(ALL_ARCH))
clean:
rm -rf monitor

build: go docker-setup
docker build --pull -t ${PREFIX}/kubelet-to-gcm:$(TAG) .

coverage:
rm -f coverage.out
go test -coverpkg=./... -coverprofile=coverage.out ./...
Loading