FROM openjdk:8-jdk-alpine3.9
#FOR PI 4
#FROM arm32v7/openjdk:8-alpine
RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf


#RUN addgroup -S spring && adduser -S spring -G spring
#USER spring:spring

###install bash shell
RUN apk --no-cache add bash

###install curl
RUN apk --no-cache add curl

##install psql client
RUN apk --no-cache add postgresql-client
##install mysql client
RUN…
### mysql connect
bash-4.4# mysql -h foxgw-test-b.asiaplus.co.th -P 3306 -u itefox -D NTFEX -p
Enter password: <enter password>
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection…

### access inside containner
kubectl exec -it po/hellospring-deployment-796cc7cb8b-7cn5d bin/bash -n bo
### Connect
sqlcmd -S bo-test.xxxxxx.co.th,1433 -d dbname -U username
Password: <enter passpord>
### list current dbname
1> select name from sys.databases
2> go
### list tableName on current dbname
1> select name from sys.tables
2> go
### switch to dbname
1> use dbname
2> go
### exit sqlcmd
1> exit
### exec to alpine containner
docker exec -it nifty_dubinsky sh
###alpine install psql
apk add postgresql-client
### connect to postgres
psql -h host -d database -U user -W
###Example
psql -U doadmin -p 25060 -h postgres-db-cluster-do-user-8157246-0.b.db.ondigitalocean.com logback -W
### when connected postgres require your enter password
Password for user doadmin:
## when password valid…

Export privte key
step 1
Use Java keytool to convert from JKS to P12
keytool -importkeystore \
-srckeystore keystore.jks \
-destkeystore keystore.p12 \
-deststoretype PKCS12 \
-srcalias <jkskeyalias> \
-deststorepass <password> \
-destkeypass <password>

step2
use openssl to export from P12 to certificatefile format Cer / PEM
2.1 Export certificate using openssl:
openssl…

  • Build Image

Navigate to the Dockerfile location (ex :dockerfile is located D:\APITest\Apitest\Dockerfile )

cd d:\APITest\Apitest

docker build -t Named:TagVersion . (dot is mean current location is docker file located)

ex: docker build -t myApi:1.0 .

Docker Prune images

The docker image prune command allows you to clean up unused images. By default, docker image prune only cleans up dangling images. A dangling image is one that is not tagged and is not referenced by any container. To remove dangling images:

$ docker image pruneWARNING! This will remove all dangling images.
Are you sure you want to continue? [y/N] y

To remove all images which are not used by existing containers, use the -a flag:

$ docker image prune -aWARNING! This will remove all images without at least one container associated to them.
Are you sure you want to continue? [y/N] y

  • check version docker installed

docker — version

  • list all image

docker image ls / docker images

  • pull images from hub.docker.com

docker pull imageName:version

ex: docker pull rabbitmq:3.8.8

  • delete image

docker rmi imageName:version / docker rmi imageID

  • list volume

docker volume ls

  • create volume

docker volume create volumeName

  • inspect volume

docker…

use for temporaly hide current working files in to stack repository location.

  • List stash

git stash list

  • push current all working files on staying branch to stack repository location

git stash -m”comment message”

or can use in long form command

git stash push -m “comment message”

  • push specific single or…
  • Clone Repository

git clone https://UserName:Password@gitlab.com/userprofile/projectname.git

git clone https://UserName:Token@gitlab.com/userprofile/projectname.git

  • Show all local Branch

git branch

  • Show all Remote Branch

git branch — remote

  • Show All Branch (Local & Remote)

git branch -a

  • Show Hash and Subject

git branch -av

  • Initial Local Repository

git init

  • Show Remote Repository

git remote -v

  • Add…

Twenty Four O Clock

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store