Merge pull request #145 from marcel-dempers/codespaces

codespaces
This commit is contained in:
Marcel Dempers 2022-06-13 16:54:19 +10:00 committed by GitHub
commit 2d0c1d88e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,42 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.162.0/containers/javascript-node
{
"name": "kubernetes-tutorial-basic",
"build": {
"dockerfile": "dockerfile",
"args": { "KIND_VERSION": "0.14.0" }
},
"mounts": ["type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock"],
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/sh"
},
// Add the IDs of extensions you want installed when the container is created.
// "extensions": [
// "dbaeumer.vscode-eslint"
// ],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "root"
}
//Notes:
// Set site url for wordpress
// mysql -u exampleuser -p exampledb
// UPDATE wp_options
// SET option_value = 'https://docker-development-youtube-series-4rjv9rg7hqrg9-80.githubpreview.dev'
// WHERE option_name = 'home';
// UPDATE wp_options
// SET option_value = 'https://docker-development-youtube-series-4rjv9rg7hqrg9-80.githubpreview.dev'
// WHERE option_name = 'siteurl';

12
.devcontainer/dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM alpine:latest
ARG KIND_VERSION=0.14.0
RUN apk add --no-cache curl docker-cli
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
RUN chmod +x ./kubectl
RUN mv ./kubectl /usr/local/bin/kubectl
RUN curl -L https://github.com/kubernetes-sigs/kind/releases/download/v${KIND_VERSION}/kind-linux-amd64 -o /usr/local/bin/kind && \
chmod +x /usr/local/bin/kind