Skip to content

Commit

Permalink
Merge pull request #28 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Dockerfiles improvements
  • Loading branch information
andyone authored Jul 9, 2019
2 parents 674100f + 7f59f7b commit 489c0bc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
16 changes: 14 additions & 2 deletions centos6.docker
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## BUILDER #####################################################################

FROM centos:6 as builder

RUN mkdir -p "/go/src" && chmod -R 777 "/go"
Expand All @@ -8,22 +10,32 @@ WORKDIR /go/src/github.com/essentialkaos/perfecto

COPY . .

RUN yum -y -q install https://yum.kaos.st/6/release/x86_64/kaos-repo-9.1-0.el6.noarch.rpm && \
RUN yum -y -q install https://yum.kaos.st/kaos-repo-latest.el6.noarch.rpm && \
yum -y -q install make golang git upx && \
make deps && \
make all && \
upx perfecto

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

FROM centos:6

LABEL name="Perfecto Image on CentOS 6" \
vendor="ESSENTIAL KAOS" \
maintainer="Anton Novojilov" \
license="EKOL" \
version="2019.07.10"

COPY --from=builder /go/src/github.com/essentialkaos/perfecto/perfecto /usr/bin/

COPY common/rpmlint.conf /root/.config/rpmlint

RUN yum -y -q install https://yum.kaos.st/6/release/x86_64/kaos-repo-9.1-0.el6.noarch.rpm && \
RUN yum -y -q install https://yum.kaos.st/kaos-repo-latest.el6.noarch.rpm && \
yum -y -q install rpmlint

VOLUME /perfecto
WORKDIR /perfecto

ENTRYPOINT ["perfecto"]

################################################################################
16 changes: 14 additions & 2 deletions centos7.docker
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## BUILDER #####################################################################

FROM centos:7 as builder

RUN mkdir -p "/go/src" && chmod -R 777 "/go"
Expand All @@ -8,22 +10,32 @@ WORKDIR /go/src/github.com/essentialkaos/perfecto

COPY . .

RUN yum -y -q install https://yum.kaos.st/7/release/x86_64/kaos-repo-9.1-0.el7.noarch.rpm && \
RUN yum -y -q install https://yum.kaos.st/kaos-repo-latest.el7.noarch.rpm && \
yum -y -q install make golang git upx && \
make deps && \
make all && \
upx perfecto

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

FROM centos:7

LABEL name="Perfecto Image on CentOS 7" \
vendor="ESSENTIAL KAOS" \
maintainer="Anton Novojilov" \
license="EKOL" \
version="2019.07.10"

COPY --from=builder /go/src/github.com/essentialkaos/perfecto/perfecto /usr/bin/

COPY common/rpmlint.conf /root/.config/rpmlint

RUN yum -y -q install https://yum.kaos.st/7/release/x86_64/kaos-repo-9.1-0.el7.noarch.rpm && \
RUN yum -y -q install https://yum.kaos.st/kaos-repo-latest.el7.noarch.rpm && \
yum -y -q install rpmlint

VOLUME /perfecto
WORKDIR /perfecto

ENTRYPOINT ["perfecto"]

################################################################################

0 comments on commit 489c0bc

Please sign in to comment.