Skip to content

Commit

Permalink
disable optional extras and add hugo
Browse files Browse the repository at this point in the history
  • Loading branch information
usrbinkat committed Nov 15, 2023
1 parent e135352 commit 9a9583d
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 105 deletions.
87 changes: 50 additions & 37 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -221,50 +221,63 @@ RUN set -ex \
&& yarn --version \
&& true
# Install kind (kubernetes-in-docker)
# TODO: relocate install to devcontainer.json
RUN set -ex \
&& export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
&& export urlKindRelease="https://api.github.com/repos/kubernetes-sigs/kind/releases/latest" \
&& export urlKindVersion=$(curl -s ${urlKindRelease} | awk -F '["v,]' '/tag_name/{print $5}') \
&& export urlKindBase="https://github.com/kubernetes-sigs/kind/releases/download" \
&& export urlKindBin="kind-linux-${arch}" \
&& export urlKind="${urlKindBase}/v${urlKindVersion}/${urlKindBin}" \
&& sudo curl -L ${urlKind} --output /usr/local/bin/kind \
&& sudo chmod +x /usr/local/bin/kind \
&& which kind \
&& kind version \
&& true
# Install kubectl
# TODO: relocate install to devcontainer.json
# Install hugo
EXPOSE 1313
RUN set -ex \
&& export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
&& export varKubectlVersion="$(curl --silent -L https://storage.googleapis.com/kubernetes-release/release/stable.txt | sed 's/v//g')" \
&& export varKubectlUrl="https://storage.googleapis.com/kubernetes-release/release/v${varKubectlVersion}/bin/linux/${arch}/kubectl" \
&& sudo curl -L ${varKubectlUrl} --output /usr/local/bin/kubectl \
&& sudo chmod +x /usr/local/bin/kubectl \
&& kubectl version --client || true \
&& export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "x64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
&& export urlHugoRelease="https://api.github.com/repos/gohugoio/hugo/releases/latest" \
&& export urlHugoVersion=$(curl -s ${urlHugoRelease} | awk -F '["v,]' '/tag_name/{print $5}') \
&& export urlHugoBase="https://github.com/gohugoio/hugo/releases/download" \
&& export urlHugoBin="hugo_${urlHugoVersion}_linux-${arch}.deb" \
&& export urlHugo="${urlHugoBase}/v${urlHugoVersion}/${urlHugoBin}" \
&& curl --output /tmp/${urlHugoBin} -L ${urlHugo} \
&& sudo dpkg -i /tmp/${urlHugoBin} \
&& which hugo \
&& hugo version \
&& rm -rf /tmp/* \
&& true
# Install helm
# TODO: relocate install to devcontainer.json
RUN set -ex \
&& export varVerHelm="$(curl -s https://api.github.com/repos/helm/helm/releases/latest | awk -F '[\"v,]' '/tag_name/{print $5}')" \
&& export varUrlHelm="https://get.helm.sh/helm-v${varVerHelm}-linux-amd64.tar.gz" \
&& curl -L ${varUrlHelm} | tar xzvf - --directory /tmp linux-amd64/helm \
&& chmod +x /tmp/linux-amd64/helm \
&& sudo mv /tmp/linux-amd64/helm /usr/local/bin/helm \
&& helm version \
&& rm -rf /tmp/linux-amd64 \
&& true
## Install kind (kubernetes-in-docker)
## TODO: relocate install to devcontainer.json
#RUN set -ex \
# && export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
# && export urlKindRelease="https://api.github.com/repos/kubernetes-sigs/kind/releases/latest" \
# && export urlKindVersion=$(curl -s ${urlKindRelease} | awk -F '["v,]' '/tag_name/{print $5}') \
# && export urlKindBase="https://github.com/kubernetes-sigs/kind/releases/download" \
# && export urlKindBin="kind-linux-${arch}" \
# && export urlKind="${urlKindBase}/v${urlKindVersion}/${urlKindBin}" \
# && sudo curl -L ${urlKind} --output /usr/local/bin/kind \
# && sudo chmod +x /usr/local/bin/kind \
# && which kind \
# && kind version \
# && true
#
## Install kubectl
## TODO: relocate install to devcontainer.json
#RUN set -ex \
# && export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \
# && export varKubectlVersion="$(curl --silent -L https://storage.googleapis.com/kubernetes-release/release/stable.txt | sed 's/v//g')" \
# && export varKubectlUrl="https://storage.googleapis.com/kubernetes-release/release/v${varKubectlVersion}/bin/linux/${arch}/kubectl" \
# && sudo curl -L ${varKubectlUrl} --output /usr/local/bin/kubectl \
# && sudo chmod +x /usr/local/bin/kubectl \
# && kubectl version --client || true \
# && true
#
## Install helm
## TODO: relocate install to devcontainer.json
#RUN set -ex \
# && export varVerHelm="$(curl -s https://api.github.com/repos/helm/helm/releases/latest | awk -F '[\"v,]' '/tag_name/{print $5}')" \
# && export varUrlHelm="https://get.helm.sh/helm-v${varVerHelm}-linux-amd64.tar.gz" \
# && curl -L ${varUrlHelm} | tar xzvf - --directory /tmp linux-amd64/helm \
# && chmod +x /tmp/linux-amd64/helm \
# && sudo mv /tmp/linux-amd64/helm /usr/local/bin/helm \
# && helm version \
# && rm -rf /tmp/linux-amd64 \
# && true
WORKDIR /workspaces
CMD ["/usr/bin/zsh"]
# Hugo Development Web Server Port for pulumi/pulumi-hugo
EXPOSE 1313
# GHCR Labels
LABEL org.opencontainers.image.licenses="APACHE2"
LABEL org.opencontainers.image.source="https://github.com/pulumi/devcontainer"
Expand Down
25 changes: 18 additions & 7 deletions devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
{
"name": "pulumi",
"image": "ghcr.io/pulumi/devcontainer",
"settings": {
"terminal.integrated.shell.linux": "/usr/bin/zsh"
},
"customizations": {
"vscode": {
"settings": [
Expand All @@ -23,6 +20,7 @@
"editor.gotoLocation.multipleDeclarations", "goto",
"editor.gotoLocation.multipleImplementations", "goto",
"editor.gotoLocation.multipleTypeDefinitions", "goto",
"terminal.integrated.shell.linux": "/usr/bin/zsh",
"files.trimTrailingWhitespace", true,
"files.trimFinalNewlines", true
],
Expand All @@ -44,14 +42,27 @@
}
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true,
"installOhMyZsh": true,
"installOhMyZshConfig": true,
"upgradePackages": true,
"nonFreePackages": true,
"username": "vscode",
"userUid": "automatic",
"userGid": "automatic"
},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"version": "latest",
"installDockerBuildx": true,
"moby": false
"moby": false,
"installDockerBuildx": true,
"version": "latest",
"dockerDashComposeVersion": "v2"
}
},
"postCreateCommand": "git submodule update --init --recursive",
"remoteUser": "vscode",
"forwardPorts": [1313],
"runArgs": ["--network=host"]
}

61 changes: 0 additions & 61 deletions team-docs/devcontainer.json

This file was deleted.

0 comments on commit 9a9583d

Please sign in to comment.