Skip to content

Commit

Permalink
Use alpine images
Browse files Browse the repository at this point in the history
  • Loading branch information
SaaldjorMike committed Sep 16, 2024
1 parent a4acdda commit 3b619e8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.22 AS builder
FROM golang:1.22-alpine AS builder

ARG RELEASE_VERSION=master
ARG RELEASE_COMMIT=none
Expand Down
2 changes: 1 addition & 1 deletion images/helper/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22 AS builder
FROM golang:1.22-alpine AS builder

ARG RELEASE_VERSION=master
ARG RELEASE_COMMIT=none
Expand Down
4 changes: 2 additions & 2 deletions images/logscale-dummy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:1.22 AS builder
FROM golang:1.22-alpine AS builder

WORKDIR /app/humio
COPY . /app/humio
RUN go run "$(go env GOROOT)/src/crypto/tls/generate_cert.go" -host dummy
RUN chmod a+r key.pem
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /app/humio/dummy /app/humio/*.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /app/humio/dummy /app/humio/*.go
7 changes: 5 additions & 2 deletions test.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
FROM golang:1.22.2
# syntax=docker/dockerfile:1.7-labs
FROM golang:1.22.2-alpine

RUN apk add bash

# Create and populate /var/src with the source code for the humio-operator repository
RUN mkdir /var/src
COPY ./ /var/src
COPY --exclude=tmp --exclude=bin ./ /var/src
WORKDIR /var/src

RUN bash -c "rm -rf /var/src/tmp/*"
Expand Down

0 comments on commit 3b619e8

Please sign in to comment.