very confusing, poor design IMHO
Dockerfile:
FROM ubuntu
ENV myname "pierre"
ENTRYPOINT ["/bin/bash", "-c", "echo hello ${myname}"]
docker built -t hello01 .
docker run hello01
FROM ubuntu
ENTRYPOINT ["sleep"]
docker built -t hello02 .
docker run hello02
#this sleep for 5s
docker run hello02 5
#this gives error because parameter is missing
docker run hello02
FROM ubuntu
ENTRYPOINT ["sleep"]
CMD ["5"]
this version uses a default time of 5, if not specified in command line
"docker run hello02" will sleep for 5
"docker run hello02 10" will sleep for 10
Friday, July 12, 2019
Thursday, July 11, 2019
Java JSSE SSL flags
-Djavax.net.debug=help
all turn on all debugging
ssl turn on ssl debugging
The following can be used with ssl:
record enable per-record tracing
handshake print each handshake message
keygen print key generation data
session print session activity
defaultctx print default SSL initialization
sslctx print SSLContext tracing
sessioncache print session cache tracing
keymanager print key manager tracing
trustmanager print trust manager tracing
pluggability print pluggability tracing
handshake debugging can be widened with:
data hex dump of each handshake message
verbose verbose handshake message printing
record debugging can be widened with:
plaintext hex dump of record plaintext
packet print raw SSL/TLS packets
Other non-so-famous properties:
https://www.oracle.com/technetwork/java/javase/overview/tlsreadme2-176330.html
-Dsun.security.ssl.allowUnsafeRenegotiation=true
-Dsun.security.ssl.allowLegacyHelloMessages=true
https://www.oracle.com/technetwork/java/javase/8u161-relnotes-4021379.html
-Djdk.tls.allowLegacyResumption=true
-Djdk.tls.allowLegacyMasterSecret=true
-Djdk.tls.traceHandshakeException=true
-Djdk.tls.useExtendedMasterSecret=true
-Djdk.tls.legacyAlgorithms=???
-Djdk.tls.ephemeralDHKeySize=???
https://docs.oracle.com/javase/10/security/java-secure-socket-extension-jsse-reference-guide.htm
jdk.tls.client.cipherSuites
jdk.tls.server.cipherSuites
all turn on all debugging
ssl turn on ssl debugging
The following can be used with ssl:
record enable per-record tracing
handshake print each handshake message
keygen print key generation data
session print session activity
defaultctx print default SSL initialization
sslctx print SSLContext tracing
sessioncache print session cache tracing
keymanager print key manager tracing
trustmanager print trust manager tracing
pluggability print pluggability tracing
handshake debugging can be widened with:
data hex dump of each handshake message
verbose verbose handshake message printing
record debugging can be widened with:
plaintext hex dump of record plaintext
packet print raw SSL/TLS packets
Other non-so-famous properties:
https://www.oracle.com/technetwork/java/javase/overview/tlsreadme2-176330.html
-Dsun.security.ssl.allowUnsafeRenegotiation=true
-Dsun.security.ssl.allowLegacyHelloMessages=true
https://www.oracle.com/technetwork/java/javase/8u161-relnotes-4021379.html
-Djdk.tls.allowLegacyResumption=true
-Djdk.tls.allowLegacyMasterSecret=true
-Djdk.tls.traceHandshakeException=true
-Djdk.tls.useExtendedMasterSecret=true
-Djdk.tls.legacyAlgorithms=???
-Djdk.tls.ephemeralDHKeySize=???
https://docs.oracle.com/javase/10/security/java-secure-socket-extension-jsse-reference-guide.htm
jdk.tls.client.cipherSuites
jdk.tls.server.cipherSuites
Wednesday, July 10, 2019
kubectl generators and restart option
https://kubernetes.io/docs/reference/kubectl/conventions/#generators
the only non-deprecated generatori is "run-pod/v1" :
kubectl run nginx --image=nginx --generator=run-pod/v1 --dry-run -o yaml
kubectl run nginx --image=nginx --dry-run -o yaml
#create nginx POD only
kubectl run nginx --image=nginx --port=80 --restart=Never --dry-run -o yaml
#create deployment nginx and pod
kubectl run nginx --image=nginx --port=80 --restart=Always --dry-run -o yaml
the only non-deprecated generatori is "run-pod/v1" :
kubectl run nginx --image=nginx --generator=run-pod/v1 --dry-run -o yaml
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: nginx
name: nginx
spec:
containers:
- image: nginx
imagePullPolicy: IfNotPresent
name: nginx
resources: {}
dnsPolicy: ClusterFirst
restartPolicy: Always
status: {}
kubectl run nginx --image=nginx --dry-run -o yaml
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
labels:
run: nginx
name: nginx
spec:
replicas: 1
selector:
matchLabels:
run: nginx
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
run: nginx
spec:
containers:
- image: nginx
name: nginx
resources: {}
status: {}
#create nginx POD only
kubectl run nginx --image=nginx --port=80 --restart=Never --dry-run -o yaml
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: nginx
name: nginx
spec:
containers:
- image: nginx
imagePullPolicy: IfNotPresent
name: nginx
ports:
- containerPort: 80
resources: {}
dnsPolicy: ClusterFirst
restartPolicy: Never
status: {}
#create deployment nginx and pod
kubectl run nginx --image=nginx --port=80 --restart=Always --dry-run -o yaml
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
labels:
run: nginx
name: nginx
spec:
replicas: 1
selector:
matchLabels:
run: nginx
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
run: nginx
spec:
containers:
- image: nginx
name: nginx
ports:
- containerPort: 80
resources: {}
status: {}
Labels:
kubectl
Subscribe to:
Posts (Atom)