- docker-compose logs --follow elasticsearch
- docker-compose -f docker-compose.elastic.yml up -d
- docker-compose ps
- docker-compose down
- docker-compose up
- docker-compose -f filename up
- docker-compose images
- docker-compose down -v [Removes all volumes created by docker]
Tuesday, July 13, 2021
Docker Compose
Monday, July 12, 2021
Docker Compose YAML Elasticsearch HTTPS
https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls-docker.html
Saturday, July 10, 2021
TLS SSL Docker Elasticsearch
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-basic-setup.html#generate-certificates
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-basic-setup-https.html#encrypt-http-communication
--------------------------------------------------------------------------------------------------------
https://stackoverflow.com/questions/50832249/enable-authentication-in-elasticsearch-with-docker-environment-variable
https://dev.to/thehoodsdev/securing-our-dockerized-elastic-stack-3o15
https://medium.com/@mandeep_m91/setting-up-elasticsearch-and-kibana-on-docker-with-x-pack-security-enabled-6875b63902e6
https://askubuntu.com/questions/772050/reset-the-password-in-ubuntu-linux-bash-in-windows
wsl --user root
elasticsearch has own cert creation module
https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls.html#tls-http
xpack.security.enabled to true
OS
Basic
Gold
Platinum
https://stackoverflow.com/questions/51445846/elasticsearch-max-virtual-memory-areas-vm-max-map-count-65530-is-too-low-inc/51447991#51447991
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
sudo sysctl -w vm.max_map_count=262144
wsl --user root
https://stackoverflow.com/questions/22049212/docker-copying-files-from-docker-container-to-host
docker cp <containerId>:/file/path/within/container /host/path/target
docker cp elasticsearch:/usr/share/elasticsearch ~
docker run -it --rm --privileged --pid=host justincormack/nsenter1
PKCS#12 format
A PFX file indicates a certificate in PKCS#12 format
https://www.sslmarket.com/ssl/how-to-create-an-pfx-file#:~:text=A%20PFX%20file%20indicates%20a,need%20to%20deploy%20a%20certificate.
docker-compose down -v
https://www.bleepingcomputer.com/news/security/new-meow-attack-has-deleted-almost-4-000-unsecured-databases/
http://localhost:9200/_xpack
http://localhost:9200/
xpack.security.http.ssl.enabled
xpack.security.transport.ssl.enabled
- xpack.security.transport.ssl.enabled=true
Friday, July 9, 2021
Docker Desktop + WSL2 + Ubuntu + WSL +docker
docker run -it --rm --privileged --pid=host justincormack/nsenter1
\\wsl2$ - Special Shared Path on Windows - which hides complex Path of WindowsDocker Desktop + Ubuntu(WSL2) --- linked
Docker commands run from both
but Images go in Docker Desktop only - \\wsl$\docker-desktop-data\version-pack-data\community\docker
Volume should be uploaded from Ubuntu/WSL2
Volume upload from Windows wont work
You can upload Folders from Windows to \\wsl$ shared path -specfically here - \\wsl$\Ubuntu-20.04\home\karankaw
and it will show up as ~ in WSL2/Ubuntu
Thursday, July 8, 2021
Windows: Docker : exec :Docker Desktop
https://www.bretfisher.com/getting-a-shell-in-the-docker-for-windows-vm/
Getting a Shell in the Docker for Windows Moby VM
Moby VM - Mean Dummy Linux VM running on WSL Windows
docker run -it --rm --privileged --pid=host justincormack/nsenter1
Docker Volumes - File Locations for docker which Persist after container
https://www.freecodecamp.org/news/where-are-docker-images-stored-docker-container-paths-explained/
https://www.docker.com/blog/how-to-use-the-official-nginx-docker-image/ [Example]
Docker Volumes
It is possible to add a persistent store to containers to keep data longer than the container exists or to share the volume with the host or with other containers. A container can be started with a volume by using the -v option:
$ docker run --name nginx_container -v /var/log nginx
$
docker inspect nginx_container
Adding Custom HTML
By default, Nginx looks in the /usr/share/nginx/html
directory inside of the container for files to serve. We need to get our html files into this directory. A fairly simple way to do this is use a mounted volume. With mounted volumes, we are able to link a directory on our local machine and map that directory into our running container.
docker run -it --rm -d -p 8080:80 --name web -v ~/site-content:/usr/share/nginx/html nginx
docker run -v /path/to/host/directory:/path/inside/the/container imageWhen a docker container is deleted,
volume is not deleted by itself, atleast not by default.
Clean up space used by Docker
It is recommended to use the Docker command to clean up unused containers. Container, networks, images, and the build cache can be cleaned up by executing:
$ docker system prune -a
Additionally, you can also remove unused volumes by executing:
$ docker volumes prune
Azure - Pipeline - Add Approver for Stage
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass
-
https://www.baeldung.com/spring-properties-file-outside-jar https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-featu...
-
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass
-
The decision was made to block such external HTTP repositories by default https://stackoverflow.com/questions/66980047/maven-build-failure-d...