Skip to content

Commit

Permalink
Merge pull request #13 from 3scale-ops/feat/add-tooling
Browse files Browse the repository at this point in the history
feat: add tooling required for the automated image update PR
  • Loading branch information
3scale-robot authored Dec 5, 2022
2 parents 009c5d9 + e1d8f9e commit 7266214
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 26 deletions.
40 changes: 22 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
FROM hashicorp/terraform:1.0.10 as terraform
FROM hashicorp/terraform:1.3.5 as terraform

FROM amazon/aws-cli:2.3.4 as aws
FROM amazon/aws-cli:2.8.13 as aws

FROM golang:1.17.3-stretch as go
FROM regclient/regctl:edge-alpine as regctl

RUN GO111MODULE=on go get github.com/raviqqe/liche
FROM golang:1.19.3-bullseye as go

FROM debian:stable-slim
RUN GO111MODULE=on go install github.com/raviqqe/liche@latest

FROM debian:stable-20221114-slim

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git make openssh-client curl unzip locales \
default-mysql-client \
python3-minimal ruby \
&& apt-get clean autoclean \
&& apt-get autoremove -y --purge \
&& rm -rf /var/lib/apt/lists/*

RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment \
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen\
&& echo "LANG=en_US.UTF-8" > /etc/locale.conf\
&& locale-gen en_US.UTF-8
RUN apt-get update -yq && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -yq \
git make openssh-client curl unzip locales \
default-mysql-client jq \
python3-minimal ruby && \
find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete

RUN \
echo "LC_ALL=en_US.UTF-8" >>/etc/environment && \
echo "en_US.UTF-8 UTF-8" >>/etc/locale.gen && \
echo "LANG=en_US.UTF-8" >/etc/locale.conf && \
locale-gen en_US.UTF-8

ENV LANG "en_US.UTF-8"
ENV LANGUAGE "en_US.UTF-8"
Expand All @@ -37,6 +39,8 @@ ENV PATH "$AWS_BIN:$PATH"

COPY --from=terraform /bin/terraform /usr/bin

COPY --from=regctl /usr/local/bin/regctl /usr/bin

ENV GO_BIN /go/bin
ENV PATH "$GO_BIN:$PATH"

Expand Down
20 changes: 12 additions & 8 deletions Dockerfile-ci
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
FROM hashicorp/terraform:0.12.29 as terraform
FROM hashicorp/terraform:1.3.5 as terraform

FROM golang:1.14.6-alpine as go
FROM regclient/regctl:edge-alpine as regctl

FROM golang:1.19.3-alpine as go

# install git, required by `go get`
RUN apk add --update git

RUN GO111MODULE=on go get github.com/raviqqe/liche
RUN GO111MODULE=on go install github.com/raviqqe/liche@latest

FROM alpine:3.7
FROM alpine:3.17

ENV AWSCLI_VERSION 1.18.4

RUN apk add --update \
git make bash \
&& apk --purge -v del py-pip \
&& rm -rf /var/cache/apk/* \
&& rm -rf $HOME/.cache
git make bash jq curl git && \
apk --purge -v del py-pip && \
rm -rf /var/cache/apk/* && \
rm -rf $HOME/.cache

COPY --from=terraform /bin/terraform /usr/bin

COPY --from=regctl /usr/local/bin/regctl /usr/bin

ENV GO_BIN /go/bin
ENV PATH "$GO_BIN:$PATH"

Expand Down

0 comments on commit 7266214

Please sign in to comment.