Skip to content

Commit

Permalink
chore: support for containerized-krm, and introduce Dockerfile for dev
Browse files Browse the repository at this point in the history
Signed-off-by: Ardika Bagus <[email protected]>
  • Loading branch information
ardikabs committed Nov 10, 2023
1 parent 89ee207 commit d18b3c9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
5 changes: 4 additions & 1 deletion Dockerfile.cpuv1
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM alpine:3.14
FROM alpine:3.18

COPY helmize /usr/bin/helmize
RUN mkdir -p /.config /.cache && \
chown nobody:nobody /.config /.cache

CMD ["/usr/bin/helmize"]
15 changes: 15 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM golang:1.21-alpine3.18 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download

COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o bin/helmize

FROM alpine:3.18
COPY --from=builder /app/bin/helmize /usr/bin/helmize
RUN mkdir -p /.config /.cache && \
chown nobody:nobody /.config /.cache

USER nobody
CMD ["/usr/bin/helmize"]
5 changes: 4 additions & 1 deletion Dockerfile.goreleaser
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM ghcr.io/ardikabs/etc/shell

COPY helmize /usr/bin/helmize
ENTRYPOINT ["/usr/bin/helmize"]
RUN mkdir -p /.config /.cache && \
chown nobody:nobody /.config /.cache

CMD ["/usr/bin/helmize"]
6 changes: 1 addition & 5 deletions pkg/helm/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ func (r HelmRepo) loadFile(path string) (file *repo.File, err error) {
return
}

if err = file.WriteFile(path, 0644); err != nil {
return
}

return
return file, nil
}

// NameAndChart returns the name and chart that should be used.
Expand Down

0 comments on commit d18b3c9

Please sign in to comment.