-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tilt: speed up compiling of binaries
- Loading branch information
1 parent
38229c8
commit a65ce6d
Showing
5 changed files
with
151 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
# Ignore build and test binaries. | ||
bin/ | ||
testbin/ | ||
!bin/tf-runner | ||
!bin/tofu-controller | ||
!bin/branch-planner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM alpine:3.19 | ||
|
||
LABEL org.opencontainers.image.source="https://github.com/flux-iac/tofu-controller" | ||
|
||
ARG LIBCRYPTO_VERSION | ||
|
||
RUN apk update && \ | ||
apk add --no-cache \ | ||
libcrypto3=${LIBCRYPTO_VERSION} \ | ||
libssl3=${LIBCRYPTO_VERSION} \ | ||
ca-certificates tini git openssh-client gnupg \ | ||
libretls \ | ||
busybox | ||
|
||
COPY bin/tofu-controller /usr/local/bin/ | ||
|
||
RUN addgroup --gid 65532 -S controller && adduser --uid 65532 -S controller -G controller | ||
|
||
USER 65532:65532 | ||
|
||
ENV GNUPGHOME=/tmp | ||
|
||
ENTRYPOINT [ "/sbin/tini", "--", "tofu-controller" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM alpine:3.19 | ||
|
||
LABEL org.opencontainers.image.source="https://github.com/flux-iac/tofu-controller" | ||
|
||
ARG LIBCRYPTO_VERSION | ||
|
||
RUN apk update && \ | ||
apk add --no-cache \ | ||
libcrypto3=${LIBCRYPTO_VERSION} \ | ||
libssl3=${LIBCRYPTO_VERSION} \ | ||
ca-certificates tini git openssh-client gnupg \ | ||
libretls \ | ||
busybox | ||
|
||
COPY bin/branch-planner /usr/local/bin/ | ||
|
||
RUN addgroup --gid 65532 -S controller && adduser --uid 65532 -S controller -G controller | ||
|
||
USER 65532:65532 | ||
|
||
ENV GNUPGHOME=/tmp | ||
|
||
ENTRYPOINT [ "/sbin/tini", "--", "branch-planner" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM alpine:3.19 as base | ||
|
||
LABEL org.opencontainers.image.source="https://github.com/flux-iac/tofu-controller" | ||
|
||
ARG LIBCRYPTO_VERSION | ||
|
||
RUN apk update && \ | ||
apk add --no-cache \ | ||
busybox \ | ||
ca-certificates \ | ||
git \ | ||
gnupg \ | ||
libcrypto3=${LIBCRYPTO_VERSION} \ | ||
libssl3=${LIBCRYPTO_VERSION} \ | ||
libretls \ | ||
openssh-client \ | ||
tini | ||
|
||
RUN addgroup --gid 65532 -S runner && adduser --uid 65532 -S runner -G runner | ||
|
||
USER 65532:65532 | ||
|
||
ENV GNUPGHOME=/tmp | ||
|
||
ENTRYPOINT [ "/sbin/tini", "--", "tf-runner" ] | ||
|
||
FROM base | ||
|
||
ARG TARGETARCH | ||
ARG TF_VERSION=1.5.7 | ||
|
||
# Switch to root to have permissions for operations | ||
USER root | ||
|
||
ADD https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_${TARGETARCH}.zip /terraform_${TF_VERSION}_linux_${TARGETARCH}.zip | ||
RUN unzip -q /terraform_${TF_VERSION}_linux_${TARGETARCH}.zip -d /usr/local/bin/ && \ | ||
rm /terraform_${TF_VERSION}_linux_${TARGETARCH}.zip && \ | ||
chmod +x /usr/local/bin/terraform | ||
|
||
# Switch back to the non-root user after operations | ||
USER 65532:65532 | ||
|
||
COPY bin/tf-runner /usr/local/bin/ | ||
|