Last active
February 18, 2020 18:13
-
-
Save vymarkov/b42c1eee9d2f8d62700388c973d3032d to your computer and use it in GitHub Desktop.
VSCode - Remote Containers
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
Show hidden characters
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at | |
// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/ubuntu-18.04-git | |
{ | |
"name": "Kitchen", | |
"dockerFile": "../Dockerfile", | |
"context": "..", | |
"runArgs": [ | |
"--env-file", | |
".env" | |
], | |
// Use 'settings' to set *default* container specific settings.json values on container create. | |
// You can edit these settings after create using File > Preferences > Settings > Remote. | |
"settings": { | |
"terminal.integrated.shell.linux": "/bin/zsh", | |
"vs-kubernetes": { | |
"vs-kubernetes.namespace": "default", | |
"vs-kubernetes.kubectl-path": "/usr/local/bin/kubectl", | |
"vs-kubernetes.helm-path": "/usr/local/bin/helm", | |
"vs-kubernetes.kubectlVersioning": "user-provided", | |
"vs-kubernetes.outputFormat": "yaml", | |
"vs-kubernetes.kubeconfig": "/workspaces/staging.lazyorange.xyz/.kube/config", | |
"vs-kubernetes.knownKubeconfigs": [], | |
"vs-kubernetes.autoCleanupOnDebugTerminate": false, | |
"vs-kubernetes.nodejs-autodetect-remote-root": true, | |
"vs-kubernetes.nodejs-remote-root": "", | |
"vs-kubernetes.nodejs-debug-port": 9229, | |
"checkForMinikubeUpgrade": true, | |
"logsDisplay": "webview", | |
"imageBuildTool": "Docker" | |
} | |
}, | |
// Use 'appPort' to create a container with published ports. If the port isn't working, be sure | |
// your server accepts connections from all interfaces (0.0.0.0 or '*'), not just localhost. | |
// "appPort": [], | |
// Uncomment the next line to run commands after the container is created. | |
// "postCreateCommand": "uname -a", | |
// Uncomment the next line to use Docker from inside the container. See https://aka.ms/vscode-remote/samples/docker-in-docker for details. | |
"mounts": [ | |
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" | |
], | |
// Uncomment the next line if you will use a ptrace-based debugger like C++, Go, and Rust | |
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], | |
// Uncomment the next line to have VS Code connect as an existing non-root user in the container. | |
// On Linux, by default, the container user's UID/GID will be updated to match your local user. See | |
// https://aka.ms/vscode-remote/containers/non-root for details on adding a non-root user if none exist. | |
// "remoteUser": "vscode", | |
// Add the IDs of extensions you want installed when the container is created in the array below. | |
"extensions": [ | |
"mauve.terraform", | |
"wholroyd.hcl", | |
"EditorConfig.EditorConfig", | |
"ms-azuretools.vscode-docker", | |
"formulahendry.docker-explorer", | |
"jeff-hykin.better-dockerfile-syntax", | |
"ms-kubernetes-tools.vscode-kubernetes-tools", | |
"PKief.material-icon-theme" | |
] | |
} |
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
FROM bitnami/minideb:stretch | |
RUN apt-get update && apt-get install -qy wget unzip curl git procps | |
COPY scripts /scripts | |
ARG kubectl_ver=v1.16.0 | |
ENV KUBECTL_VERSION $kubectl_ver | |
RUN /scripts/install_kubectl.sh | |
# ==> Install Helm | |
ARG helm_ver=v2.15.1 | |
ENV HELM_VER $helm_ver | |
RUN /scripts/install_helm.sh | |
# ==> Install Terraform | |
ARG terraform_ver=0.12.18 | |
ENV TERRAFORM_VERSION $terraform_ver | |
RUN curl -LO https://raw.github.com/robertpeteuil/terraform-installer/master/terraform-install.sh && chmod +x terraform-install.sh | |
RUN ./terraform-install.sh -i $TERRAFORM_VERSION | |
# Check that it's installed | |
RUN terraform --version | |
RUN helm init -c && helm plugin install https://github.com/rimusz/helm-tiller | |
# ==> Install helmfile | |
ARG helmfile_ver=v0.94.1 | |
ENV HELMFILE_VERSION $helmfile_ver | |
RUN /scripts/install_helmfile.sh | |
# ==> Install AWS cli | |
# It increases image size from 393MB to 778MB | |
# and as a result increases the bootstrap process of Gitlab CI job | |
RUN apt-get install python python-pip -qy | |
RUN pip install awscli | |
# ==> Install doctl | |
ARG doctl_ver=1.36.0 | |
ENV DOCTL_VERSION $doctl_ver | |
RUN ./scripts/install_doctl.sh | |
# ==> Install jq | |
ADD https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 /usr/local/bin/jq | |
RUN chmod +x /usr/local/bin/jq && jq --version | |
# ==> Install zsh, direnv (not required by Gitlab Pipelines) | |
# move to separate dockerfile | |
RUN apt-get install direnv zsh -yq && sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" \ | |
&& echo 'eval "$(direnv hook zsh)"' >> $HOME/.zshrc \ | |
&& curl -sL https://howtowhale.github.io/dvm/downloads/latest/install.sh | sh \ | |
&& echo 'source /root/.dvm/dvm.sh && dvm detect' >> $HOME/.zshrc \ | |
&& echo '[[ -r $DVM_DIR/bash_completion ]] && . $DVM_DIR/bash_completion' >> $HOME/.zshrc | |
RUN apt-get remove -qy wget unzip python-pip && apt-get clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment