Saturday, February 11, 2023

using docker notes

Access page while running
 
how to log into container
 
finding container
docker ps -a

docker system in
docker info
 
run an ubuntu container
docker run -it ubuntu bash

run commands inside container (example, sub container id for -it for below)
docker exec -it 52b3bd362c40 id
 
run a shell (simple) inside a running container
docker exec -u 0 -it 0f629993d2c3 sh

with snap version of docker, containers are in directories such as
/var/snap/docker/common/var-lib-docker/overlay2/0e...6e7/diff/app
 
stop a container instance
docker stop <container>
 
list files
docker exec <container> ls
 
copy files
docker cp  <container>:relative (or abs) path  not wildcards seem to work

WatchYourLAN notes
notes for sqlite
  • install sqlite on host
  • sqlite3 db.sqlite
  • sqlite> .dump [. at start is required]
  • copy and save the resulting SQL file to something.sql for future use
  • use site https://inloop.github.io/sqlite-viewer/# to upload the db.sqlite file
  • need to clone the sqlite-viewer site to local server so it doesn't vanish and update here.
github
 
reddit support / discussion



 

No comments:

Post a Comment