Skip to content

Commit

Permalink
add runme config to devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
usrbinkat committed Aug 20, 2024
1 parent 9efb0b9 commit 67c5277
Showing 1 changed file with 95 additions and 93 deletions.
188 changes: 95 additions & 93 deletions .github/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,11 @@ ARG APT_PKGS="\
ca-certificates \
build-essential \
libarchive-tools \
neofetch \
"

# Apt Packages
RUN echo \
&& export TEST="neofetch" \
&& export TEST="gh version" \
&& ${apt_update} \
&& bash -c "${apt_install} --no-install-recommends -o Dpkg::Options::='--force-confold' ${APT_PKGS}" \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends -o Dpkg::Options::='--force-confold' openssh-server \
Expand Down Expand Up @@ -451,6 +450,33 @@ LABEL io.openshift.tags="containercraft,konductor"
LABEL org.opencontainers.image.licenses="GPLv3"
LABEL distribution-scope="public"

##################################################################################
# Install runme cli
# - https://github.com/stateful/runme/releases
RUN echo \
&& export NAME="runme" \
&& export TEST="${NAME} --version" \
&& export REPOSITORY="stateful/runme" \
&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \
&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "x86_64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
&& export PKG="${NAME}_linux_${ARCH}.deb" \
&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \
&& echo "---------------------------------------------------------"\
&& echo "INFO[${NAME}] Installed:" \
&& echo "INFO[${NAME}] Command: ${NAME}" \
&& echo "INFO[${NAME}] Package: ${PKG}" \
&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \
&& echo "INFO[${NAME}] Architecture: ${ARCH}" \
&& echo "INFO[${NAME}] Source: ${URL}" \
&& echo "---------------------------------------------------------"\
&& ${apt_update} \
&& ${curl} ${URL} --output /tmp/${PKG} \
&& DEBIAN_FRONTEND=noninteractive sudo -E apt-get install -y --no-install-recommends -o Dpkg::Options::='--force-confold' /tmp/${PKG} \
&& bash -c "${apt_clean}" \
&& ${dir_clean} \
&& ${TEST} \
&& echo

##################################################################################
# Install Taskfile cli
# - https://github.com/go-task/task/releases
Expand Down Expand Up @@ -544,78 +570,78 @@ RUN echo \
&& ${TEST} \
&& echo

# Install pulumi esc
RUN echo \
&& export NAME="esc" \
&& export TEST="esc version" \
&& export REPOSITORY="pulumi/esc" \
&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \
&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "x64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
&& export PKG="${NAME}-${VERSION}-linux-${ARCH}.tar.gz" \
&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \
&& echo "---------------------------------------------------------"\
&& echo "INFO[${NAME}] Installed:" \
&& echo "INFO[${NAME}] Command: ${NAME}" \
&& echo "INFO[${NAME}] Package: ${PKG}" \
&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \
&& echo "INFO[${NAME}] Architecture: ${ARCH}" \
&& echo "INFO[${NAME}] Source: ${URL}" \
&& echo "---------------------------------------------------------"\
&& ${curl} ${URL} | tar xzvf - --directory /tmp \
&& sudo ${INSTALL} /tmp/${NAME}/${NAME} ${BIN}/${NAME} \
&& ${dir_clean} \
&& ${TEST} \
&& echo

# Install pulumictl
RUN echo \
&& export NAME="pulumictl" \
&& export TEST="${NAME} version" \
&& export REPOSITORY="pulumi/pulumictl" \
&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \
&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
&& export PKG="${NAME}-${VERSION}-linux-${ARCH}.tar.gz" \
&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \
&& echo "---------------------------------------------------------"\
&& echo "INFO[${NAME}] Installed:" \
&& echo "INFO[${NAME}] Command: ${NAME}" \
&& echo "INFO[${NAME}] Package: ${PKG}" \
&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \
&& echo "INFO[${NAME}] Architecture: ${ARCH}" \
&& echo "INFO[${NAME}] Source: ${URL}" \
&& echo "---------------------------------------------------------"\
&& ${curl} ${URL} | tar xzvf - --directory /tmp \
&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \
&& ${dir_clean} \
&& ${TEST} \
&& echo
## Install pulumi esc
#RUN echo \
# && export NAME="esc" \
# && export TEST="esc version" \
# && export REPOSITORY="pulumi/esc" \
# && export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \
# && export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "x64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
# && export PKG="${NAME}-${VERSION}-linux-${ARCH}.tar.gz" \
# && export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \
# && echo "---------------------------------------------------------"\
# && echo "INFO[${NAME}] Installed:" \
# && echo "INFO[${NAME}] Command: ${NAME}" \
# && echo "INFO[${NAME}] Package: ${PKG}" \
# && echo "INFO[${NAME}] Latest Release: ${VERSION}" \
# && echo "INFO[${NAME}] Architecture: ${ARCH}" \
# && echo "INFO[${NAME}] Source: ${URL}" \
# && echo "---------------------------------------------------------"\
# && ${curl} ${URL} | tar xzvf - --directory /tmp \
# && sudo ${INSTALL} /tmp/${NAME}/${NAME} ${BIN}/${NAME} \
# && ${dir_clean} \
# && ${TEST} \
# && echo
#
## Install pulumictl
#RUN echo \
# && export NAME="pulumictl" \
# && export TEST="${NAME} version" \
# && export REPOSITORY="pulumi/pulumictl" \
# && export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \
# && export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
# && export PKG="${NAME}-${VERSION}-linux-${ARCH}.tar.gz" \
# && export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \
# && echo "---------------------------------------------------------"\
# && echo "INFO[${NAME}] Installed:" \
# && echo "INFO[${NAME}] Command: ${NAME}" \
# && echo "INFO[${NAME}] Package: ${PKG}" \
# && echo "INFO[${NAME}] Latest Release: ${VERSION}" \
# && echo "INFO[${NAME}] Architecture: ${ARCH}" \
# && echo "INFO[${NAME}] Source: ${URL}" \
# && echo "---------------------------------------------------------"\
# && ${curl} ${URL} | tar xzvf - --directory /tmp \
# && sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \
# && ${dir_clean} \
# && ${TEST} \
# && echo

##################################################################################
#### Common Binary Install Arguments
##################################################################################

# Install yq
RUN echo \
&& export NAME="yq" \
&& export TEST="${NAME} --version" \
&& export REPOSITORY="mikefarah/yq" \
&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \
&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
&& export PKG="${NAME}_linux_${ARCH}" \
&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${NAME}_linux_${ARCH}" \
&& echo "---------------------------------------------------------"\
&& echo "INFO[${NAME}] Installed:" \
&& echo "INFO[${NAME}] Command: ${NAME}" \
&& echo "INFO[${NAME}] Package: ${PKG}" \
&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \
&& echo "INFO[${NAME}] Architecture: ${ARCH}" \
&& echo "INFO[${NAME}] Source: ${URL}" \
&& echo "---------------------------------------------------------"\
&& sudo ${curl} ${URL} --output /tmp/yq \
&& sudo ${INSTALL} /tmp/yq ${BIN}/yq \
&& ${dir_clean} \
&& ${TEST} \
&& echo
## Install yq
#RUN echo \
# && export NAME="yq" \
# && export TEST="${NAME} --version" \
# && export REPOSITORY="mikefarah/yq" \
# && export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \
# && export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
# && export PKG="${NAME}_linux_${ARCH}" \
# && export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${NAME}_linux_${ARCH}" \
# && echo "---------------------------------------------------------"\
# && echo "INFO[${NAME}] Installed:" \
# && echo "INFO[${NAME}] Command: ${NAME}" \
# && echo "INFO[${NAME}] Package: ${PKG}" \
# && echo "INFO[${NAME}] Latest Release: ${VERSION}" \
# && echo "INFO[${NAME}] Architecture: ${ARCH}" \
# && echo "INFO[${NAME}] Source: ${URL}" \
# && echo "---------------------------------------------------------"\
# && sudo ${curl} ${URL} --output /tmp/yq \
# && sudo ${INSTALL} /tmp/yq ${BIN}/yq \
# && ${dir_clean} \
# && ${TEST} \
# && echo

##################################################################################
# Install Kubectl
Expand Down Expand Up @@ -919,30 +945,6 @@ RUN echo \
&& ${TEST} \
&& echo

##################################################################################
# Install Kind Kubernetes-in-Docker
RUN echo \
&& export NAME=kind \
&& export TEST="${NAME} version" \
&& export REPOSITORY="kubernetes-sigs/kind" \
&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \
&& export ARCH="$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }')" \
&& export PKG="${NAME}-linux-${ARCH}" \
&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \
&& echo "---------------------------------------------------------"\
&& echo "INFO[${NAME}] Installed:" \
&& echo "INFO[${NAME}] Command: ${NAME}" \
&& echo "INFO[${NAME}] Package: ${PKG}" \
&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \
&& echo "INFO[${NAME}] Architecture: ${ARCH}" \
&& echo "INFO[${NAME}] Source: ${URL}" \
&& echo "---------------------------------------------------------"\
&& ${curl} ${URL} --output /tmp/${NAME} \
&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \
&& ${dir_clean} \
&& ${TEST} \
&& echo

##################################################################################
# Install Krew
ARG KREW_PKG="\
Expand Down

0 comments on commit 67c5277

Please sign in to comment.