Reusable Docker Toolkit Scripting for Development Environment
Identify the last run container (both running and stopped)
docker ps -a
docker ps -a --format "{{.ID}}\t{{.Names}}\t{{.Status}}" -n 1
docker ps -lq
View the container's logs
docker logs <container_id_or_name>
LAST_CONTAINER_ID=$(docker ps -lq) && docker logs $LAST_CONTAINER_ID
Building the image:
docker build . --file Dockerfile --tag cyberthreatdefense/autokeras
[...]
<<<wait for a while>>>
[...]
or Pull the Image:
docker pull cyberthreatdefense/autokeras
Starting it up with the current working directory mounted as /mnt/share
in the container:
docker run -it -h --name autokeras -v `pwd`:/mnt/share cyberthreatdefense/autokeras
docker run -it -h --name autokeras -v ${PWD}:/mnt/share cyberthreatdefense/autokeras
Start the container
docker start -i autokeras
Building the image:
docker build . --file Dockerfile --tag cyberthreatdefense/diec
[...]
<<<wait for a while>>>
[...]
or Pull the Image:
docker pull cyberthreatdefense/diec
Starting it up with the current working directory mounted as /mnt/share
in the container:
docker run -it -h --name diec -v `pwd`:/mnt/share cyberthreatdefense/diec
docker run -it -h --name diec -v ${PWD}:/mnt/share cyberthreatdefense/diec
Start the container
docker start -i diec
Building the image:
docker build . --file Dockerfile.alpine --tag cyberthreatdefense/manalyze-alpine
[...]
<<<wait for a while>>>
[...]
or Pull the Image:
docker pull cyberthreatdefense/manalyze-alpine
Starting it up with the current working directory mounted as /mnt/share
in the container:
docker run -it -h --name manalyze-alpine -v `pwd`:/mnt/share cyberthreatdefense/manalyze-alpine
docker run -it -h --name manalyze-alpine -v ${PWD}:/mnt/share cyberthreatdefense/manalyze-alpine
Start the container
docker start -i manalyze-alpine
docker build . --file Dockerfile.ubuntu --tag cyberthreatdefense/manalyze-ubuntu
[...]
<<<wait for a while>>>
[...]
Starting it up with the current working directory mounted as /mnt/share
in the container:
docker run -it -h --name manalyze-ubuntu -v `pwd`:/mnt/share cyberthreatdefense/manalyze-ubuntu
docker run -it -h --name manalyze-ubuntu -v ${PWD}:/mnt/share cyberthreatdefense/manalyze-ubuntu
Start the container
docker start -i manalyze-ubuntu
Building the image:
docker build . --file Dockerfile --tag cyberthreatdefense/pcap-extractor
[...]
<<<wait for a while>>>
[...]
or Pull the Image:
docker pull cyberthreatdefense/pcap-extractor
Starting it up with the current working directory mounted as /mnt/share
in the container:
docker run -it -h --name pcap-extractor -v `pwd`:/mnt/share cyberthreatdefense/pcap-extractor
docker run -it -h --name pcap-extractor -v ${PWD}:/mnt/share cyberthreatdefense/pcap-extractor
Start the container
docker start -i pcap-extractor
Building the image:
# docker build . --file Dockerfile --tag cyberthreatdefense/malconv-keras-malware-benchmark
[...]
<<<wait for a while>>>
[...]
Starting it up with the current working directory mounted as /mnt/share
in the container:
# docker run -it -h malconv-keras-malware-benchmark -v `pwd`:/mnt/share cyberthreatdefense/malconv-keras-malware-benchmark
# docker run -it -h malconv-keras-malware-benchmark -v ${PWD}:/mnt/share cyberthreatdefense/malconv-keras-malware-benchmark
Building the image:
# docker build . --file Dockerfile --tag cyberthreatdefense/ember-malware-benchmark
[...]
<<<wait for a while>>>
[...]
Starting it up with the current working directory mounted as /mnt/share
in the container:
# docker run -it -h ember-malware-benchmark -v `pwd`:/mnt/share cyberthreatdefense/ember-malware-benchmark
# docker run -it -h ember-malware-benchmark -v ${PWD}:/mnt/share cyberthreatdefense/ember-malware-benchmark