Skip to content

Commit

Permalink
Improve dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Jul 6, 2024
1 parent 0a58206 commit 214e6d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
7 changes: 3 additions & 4 deletions .docker/micro.docker
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ ARG REGISTRY="docker.io"

## BUILDER #####################################################################

FROM golang:alpine3.17 as builder
FROM ${REGISTRY}/essentialkaos/golang:alpine3.18 as builder

WORKDIR /go/src/github.com/essentialkaos/perfecto

COPY . .

# hadolint ignore=DL3018
RUN apk add --no-cache git make && make deps && make all
RUN make deps && make all

## FINAL IMAGE #################################################################

FROM ${REGISTRY}/essentialkaos/alpine:3.17
FROM ${REGISTRY}/essentialkaos/alpine:3.18

LABEL org.opencontainers.image.title="perfecto" \
org.opencontainers.image.description="Tool for checking perfectly written RPM specs" \
Expand Down
7 changes: 2 additions & 5 deletions .docker/ol8.docker
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG REGISTRY="docker.io"

## BUILDER #####################################################################

FROM ${REGISTRY}/essentialkaos/oraclelinux:8 as builder
FROM ${REGISTRY}/essentialkaos/golang:ol8 as builder

RUN mkdir -p "/go/src" && chmod -R 777 "/go"

Expand All @@ -14,10 +14,7 @@ WORKDIR /go/src/github.com/essentialkaos/perfecto

COPY . .

# hadolint ignore=DL3031,DL3041
RUN dnf -y -q install https://yum.kaos.st/kaos-repo-latest.el8.noarch.rpm && \
dnf -y -q install make golang git && \
dnf clean all && make deps && make all
RUN make deps && make all

## FINAL IMAGE #################################################################

Expand Down
7 changes: 2 additions & 5 deletions .docker/ol9.docker
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG REGISTRY="docker.io"

## BUILDER #####################################################################

FROM ${REGISTRY}/essentialkaos/oraclelinux:9 as builder
FROM ${REGISTRY}/essentialkaos/golang:ol9 as builder

RUN mkdir -p "/go/src" && chmod -R 777 "/go"

Expand All @@ -14,10 +14,7 @@ WORKDIR /go/src/github.com/essentialkaos/perfecto

COPY . .

# hadolint ignore=DL3031,DL3041
RUN dnf -y -q install https://yum.kaos.st/kaos-repo-latest.el9.noarch.rpm && \
dnf -y -q install make golang git && \
dnf clean all && make deps && make all
RUN make deps && make all

## FINAL IMAGE #################################################################

Expand Down

0 comments on commit 214e6d5

Please sign in to comment.