From b5a4621d5818f8dbe7d8c89b2f0ca22eada12004 Mon Sep 17 00:00:00 2001 From: marcel-dempers Date: Tue, 7 Jun 2022 09:07:42 +1000 Subject: [PATCH 1/3] codespaces container --- .devcontainer/devcontainer.json | 28 ++++++++++++++++++++++++++++ .devcontainer/dockerfile | 8 ++++++++ 2 files changed, 36 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/dockerfile diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..83ec9a4 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,28 @@ +// 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" } + }, + + // 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" + } \ No newline at end of file diff --git a/.devcontainer/dockerfile b/.devcontainer/dockerfile new file mode 100644 index 0000000..84104dd --- /dev/null +++ b/.devcontainer/dockerfile @@ -0,0 +1,8 @@ +FROM alpine:latest + +ARG KIND_VERSION=0.14.0 + +RUN apk add --no-cache curl + +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 \ No newline at end of file From 143dfaaf976db8e51f7007c7c9259b9a28a801f7 Mon Sep 17 00:00:00 2001 From: marcel-dempers Date: Tue, 7 Jun 2022 09:23:12 +1000 Subject: [PATCH 2/3] update container add docker --- .devcontainer/devcontainer.json | 1 + .devcontainer/dockerfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 83ec9a4..f31a762 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,6 +6,7 @@ "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": { diff --git a/.devcontainer/dockerfile b/.devcontainer/dockerfile index 84104dd..6245fc7 100644 --- a/.devcontainer/dockerfile +++ b/.devcontainer/dockerfile @@ -2,7 +2,7 @@ FROM alpine:latest ARG KIND_VERSION=0.14.0 -RUN apk add --no-cache curl +RUN apk add --no-cache curl docker-cli 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 \ No newline at end of file From e150df64261799aad16801d6343a41968d38a37b Mon Sep 17 00:00:00 2001 From: marcel-dempers Date: Tue, 7 Jun 2022 14:00:00 +1000 Subject: [PATCH 3/3] updates --- .devcontainer/devcontainer.json | 15 ++++++++++++++- .devcontainer/dockerfile | 6 +++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f31a762..c4e4122 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -26,4 +26,17 @@ // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "root" - } \ No newline at end of file + } + + //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'; \ No newline at end of file diff --git a/.devcontainer/dockerfile b/.devcontainer/dockerfile index 6245fc7..0126eb1 100644 --- a/.devcontainer/dockerfile +++ b/.devcontainer/dockerfile @@ -4,5 +4,9 @@ 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 \ No newline at end of file + chmod +x /usr/local/bin/kind \ No newline at end of file