docker rm $(docker ps -aq)
docker inspect <image>
docker diff <image>
docker history <image>
docker exec -it <container_name>
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
namespace: spinnaker | |
labels: | |
app: spinnaker-spinnaker | |
component: deck | |
name: spinnaker-deck-ingress | |
spec: | |
rules: |
clusters: | |
- cluster: | |
insecure-skip-tls-verify: true | |
server: https://kubernetes.svc.default | |
name: spinnaker-local | |
contexts: | |
- context: | |
cluster: spinnaker-local | |
namespace: spinnaker | |
user: spinnaker-svc-account |
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: echoheaders | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: echoheaders |
apiVersion: v1 | |
clusters: | |
- cluster: | |
insecure-skip-tls-verify: true | |
server: https://127.0.0.1:6443 | |
name: local-secure | |
- cluster: | |
insecure-skip-tls-verify: true | |
server: http://127.0.0.1:8080 | |
name: local-insecure |
clusters: | |
- cluster: | |
insecure-skip-tls-verify: true | |
server: http://127.0.0.1:8080 | |
name: k8s-sushant | |
contexts: | |
- context: | |
cluster: k8s-sushant | |
namespace: kube-system | |
user: admin |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: aws-cli | |
labels: | |
name: aws-cli | |
annotations: | |
iam.amazonaws.com/role: arn:aws:iam::1234567890:role/test-role-dynamo-ro | |
spec: | |
containers: |
containers: | |
.... | |
volumeMounts: | |
- mountPath: /etc/foo/template | |
name: foo-template-volume | |
readOnly: true | |
- mountPath: /etc/foo/config | |
name: foo-config-volume | |
volumes: | |
- name: foo-template-volume |
def union(parent,child): | |
"""Performs a union by attaching the root node of the smaller set to the | |
root node of the larger set""" | |
if parent.set_size < child.set_size: | |
child, parent = parent, child | |
parent_head = find(parent) | |
child_head = find(child) | |
if parent_head == child_head: |
from functools import wraps | |
def memo(func): | |
cache = {} | |
@wraps(func) | |
def wrap(*args): | |
if args not in cache: | |
cache[args] = func(*args) | |
return cache[args] | |
return wrap |