screen ~/Library/Containers//com.docker.docker/Data/vms/0/tty
screen -AmdS docker ~/Library/Containers//com.docker.docker/Data/vms/0/tty
screen -r docker
# enter, then disconnect with Ctrl-a d
screen -S docker -p 0 -X stuff $(printf root\\r\\n)
screen -r docker
This file contains hidden or 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
#!/bin/bash | |
apt-get update | |
apt-get install -y git wget | |
# Install Docker | |
apt-get install -yq \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ |
TOOL | VERSION | LINK |
---|---|---|
VirtualBox | latest | https://www.virtualbox.org/wiki/Downloads |
Vagrant | latest | https://www.vagrantup.com/downloads.html |
Error
Linux kube-01 4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
root@kube-01:/home/vagrant# kubeadm init --apiserver-advertise-address 192.168.56.101 --pod-network-cidr=192.168.0.0/16
[init] Using Kubernetes version: v1.13.4
[preflight] Running pre-flight checks
As a devops engineer, you are asked to write a Dockerfile to automate image build for deploying Facebooc, a Facebook clone written in C language. It uses SQLite as a database backend to store user logins and posts.
Source Repo: https://github.com/schoolofdevops/facebooc.git
Use ubuntu as a base image/platform
This file contains hidden or 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
pipeline { | |
agent any | |
stages{ | |
stage("one"){ | |
steps{ | |
echo 'step 1' | |
sleep 3 | |
} | |
} | |
stage("two"){ |
This file contains hidden or 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
export PENDING_NAMESPACE=xxxxxx | |
kubectl get namespace $PENDING_NAMESPACE -o json | tr -d "\n" | sed "s/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/" | kubectl replace --raw /api/v1/namespaces/$PENDING_NAMESPACE/finalize -f - |
export kubever=$(kubectl version | base64 | tr -d '\n')
kubectl delete -f "https://cloud.weave.works/k8s/net?k8s-version=$kubever"
kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml
kubectl create -f https://docs.projectcalico.org/manifests/custom-resources.yaml
This file contains hidden or 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 alpine AS build | |
WORKDIR /opt/facebooc | |
COPY . . | |
RUN apk add --update alpine-sdk sqlite-dev sqlite && \ | |
make all | |
FROM alpine AS run | |
WORKDIR /opt/facebooc | |
COPY --from=build /opt/facebooc/bin . |
C:\Users\xyz> wsl -l
[sample output] Windows Subsystem for Linux Distributions: docker-desktop-data (Default) docker-desktop Ubuntu
OlderNewer