Skip to content

Commit 037cbae

Browse files
authored
Merge pull request #132 from uptick/PLT-1078/use-graviton-instances
Build docker images for graviton instances
2 parents a99b2b5 + 9bcdc72 commit 037cbae

3 files changed

Lines changed: 21 additions & 19 deletions

File tree

.github/workflows/release-please.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,5 @@ jobs:
7676
docker-context: "."
7777
docker-tag: "${{ needs.release-please.outputs.server-version }}"
7878
docker-tag-latest: true
79-
docker-image-platforms: linux/amd64
8079
docker-repository: "610829907584.dkr.ecr.ap-southeast-2.amazonaws.com/gitops"
8180
command: echo $SECRET_ENV | base64 -d > cluster.key

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,5 @@ jobs:
3636
docker-context: "."
3737
docker-prefix: test
3838
docker-tag-latest: false
39-
docker-image-platforms: linux/amd64
4039
docker-repository: "610829907584.dkr.ecr.ap-southeast-2.amazonaws.com/gitops"
4140
command: echo $SECRET_ENV | base64 -d > cluster.key

Dockerfile

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,39 @@
11
FROM python:3.12-slim
22

3+
ARG TARGETARCH
4+
35
##
46
## Install kubectl and dependencies.
57
##
6-
# RUN apk add -U openssl curl tar gzip bash ca-certificates && \
7-
# wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub && \
8-
# wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.23-r3/glibc-2.23-r3.apk && \
9-
# apk add glibc-2.23-r3.apk && \
10-
# rm glibc-2.23-r3.apk
11-
# RUN curl -L -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.8.0/bin/linux/amd64/kubectl && \
12-
# chmod +x /usr/bin/kubectl && \
13-
# kubectl version --client
148
ENV KUBE_LATEST_VERSION="v1.21.3"
159
ENV HELM_VERSION="v3.6.2" \
1610
VIRTUAL_ENV="/app/.venv" \
1711
PATH="/app/.venv/bin:$PATH"
18-
RUN apt-get update
19-
RUN apt-get install wget ca-certificates bash git git-crypt -y --no-install-recommends \
20-
&& wget -q https://storage.googleapis.com/kubernetes-release/release/${KUBE_LATEST_VERSION}/bin/linux/amd64/kubectl -O /usr/local/bin/kubectl \
12+
13+
14+
RUN apt-get update \
15+
&& apt-get install wget ca-certificates bash git git-crypt -y --no-install-recommends \
16+
# Download kubectl
17+
&& wget -q https://storage.googleapis.com/kubernetes-release/release/${KUBE_LATEST_VERSION}/bin/linux/${TARGETARCH}/kubectl -O /usr/local/bin/kubectl \
2118
&& chmod +x /usr/local/bin/kubectl \
22-
&& wget -q https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm \
19+
\
20+
# Download helm
21+
&& wget -q https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz -O - | tar -xzO linux-${TARGETARCH}/helm > /usr/local/bin/helm \
2322
&& chmod +x /usr/local/bin/helm \
23+
\
24+
# Install helm-secrets plugin
2425
&& helm plugin install https://github.com/jkroepke/helm-secrets --version v4.2.2 \
25-
&& wget -q https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.linux.amd64 -O /usr/local/bin/sops \
26+
\
27+
# Download sops
28+
&& wget -q https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.linux.${TARGETARCH} -O /usr/local/bin/sops \
2629
&& chmod +x /usr/local/bin/sops \
30+
\
2731
&& apt-get clean \
2832
&& apt-get -y autoremove \
2933
&& rm -rf /var/lib/apt/lists/* \
30-
&& rm -rf /var/cache/apt/ \
31-
ENV SHELL=/bin/bash
34+
&& rm -rf /var/cache/apt/
35+
36+
ENV SHELL=/bin/bash
3237

3338
##
3439
## Install dependencies and copy GitOps server.
@@ -49,5 +54,4 @@ ENV GIT_CRYPT_KEY_FILE=/app/cluster.key
4954
ENV PYTHONPATH="$PYTHONPATH:/app"
5055
ENV ACCESS_LOG=""
5156

52-
53-
CMD ["uvicorn", "--host", "0.0.0.0", "--port", "8000", "gitops_server.main:app"]
57+
CMD ["uvicorn", "--host", "0.0.0.0", "--port", "8000", "gitops_server.main:app"]

0 commit comments

Comments
 (0)