# Wiki Discussion: Use SWI-Prolog DockerHub image

**URL:** <https://swi-prolog.discourse.group/t/wiki-discussion-use-swi-prolog-dockerhub-image/3098>\
**Category:** Wiki Discussion\
**Created:** [October 26, 2020, 9:00am UTC](https://swi-prolog.discourse.group/t/wiki-discussion-use-swi-prolog-dockerhub-image/3098 "2020-10-26T09:00:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [October 26, 2020, 9:03am UTC](https://swi-prolog.discourse.group/t/wiki-discussion-use-swi-prolog-dockerhub-image/3098/2 "2020-10-26T09:03:56Z")

</div>

* * *

> **Remote development using Docker, WSL 2, Visual Studio Code and X-windows server**
>
> This is a work in progress but since the proof of concept is working will post here.
> 
> Since I prefer to develop SWI-Prolog using Visual Studio Code, all the development has been done on a single Windows machine. Now all of that can change to doing development with multiple Docker containers including the machine where the SWI-Prolog code is hosted and run. The only things remaining on the Windows side is Visual Studio Code and an X11 server. While this will run the Docker containers using WSL on the Windows machine, it is just a simple exercise to move the Docker containers to other host and and all should still work. Also since the machines are Docker containers, they can easily be created with a Dockerfile, and since a Dockerfile is small in comparison to the footprint of a virtual machine and all in text, the Dockerfiles can easily be put in revision control such as Git and even made public on GitHub. So this means that now you can not only share the code but the entire tool chain and environment with a few added text files; however as noted somethings in this scenario are constants: Docker, Visual Studio Code, and for SWI-Prolog GUI tools the need for X-windows server.
> 
> What follows is essentially [Remote development in WSL](https://code.visualstudio.com/docs/remote/wsl-tutorial) modified to demonstrated the same with SWI-Prolog.
> 
> [Install Visual Studio Code](https://code.visualstudio.com/docs/setup/setup-overview)
> 
> [Install Windows Terminal](https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab)
> 
> Install a Windows X-windows server (I use [VcXsrv](https://sourceforge.net/projects/vcxsrv/))
> 
> Start X11 server.
> 
> For VcXsrv configuration:
> 
> ```prolog
> Multiple windows
> Display number: -1
> Start no client
> Clipboard
> Primary Selection
> Native opengl
> Disable access control (TODO: This should not be used, use firewall rules etc.)
> 
> ```
> 
> Follow the steps in [Remote development in WSL](https://code.visualstudio.com/docs/remote/wsl-tutorial) until you get to [Python development](https://code.visualstudio.com/docs/remote/wsl-tutorial#_python-development).
> 
> Add Ubuntu to Windows Terminal  
> Using Windows Terminal open [settings](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings)
> 
> Th will need a new GUID.  
> Using Windows PowerShell
> 
> ```prolog
> [guid]::NewGuid()
> 
> ```
> 
> which will generate GUID
> 
> ```prolog
> Guid
> ----
> d23fb715-097c-4f16-89dd-98569e048fba
> 
> ```
> 
> Do not use the one where demonstrated above as a [GUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) need to be a Globally Unique ID, (GUID).
> 
> For `"list":` add something like (Don’t ask me to much on this I barely understand the details)
> 
> ```prolog
> {
> "guid": "{9e7de027-0fca-5811-94e7-9e6d96b5b97f}",
> "hidden": false,
> // Ubuntu 20.04
> // Based on Docker image
> "name": "SWI-Prolog",
> "source": "Windows.Terminal.Wsl",
> 
> // start SWI-Prolog
> // "commandline": "wsl.exe -u eric -d Ubuntu_SWI-Prolog swipl",
> 
> // defaults to starting bash
> "commandline": "wsl.exe -u <user> -d Ubuntu_SWI-Prolog",
> 
> "startingDirectory" : "//wsl$/Ubuntu_SWI-Prolog/home/<user>",
> "icon": "C:\\Program Files\\swipl\\swipl.ico"
> }
> 
> ```
> 
> where you will need to change \<user\> to your user name.  
> Note: I [duplicated](https://stackoverflow.com/a/60428590/1243762) then modified the WSL Ubuntu distro using the WSL import and export so that I could have a distro specifically for SWI-Prolog. (TODO: Create a Dockerfile for the distro.)
> 
> Install Visual Studio Code extension: [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)
> 
> Using Windows Terminal start WSL distro by clicking ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/6/6bcd0a13a634b63a25ae92e591cc99776e0db3f3.png) and then selecting SWI-Prolog from drop down list.
> 
> Using WSL SWI-Prolog distro
> 
> Verify SWI-Prolog is installed and working
> 
> ```bash
> eric@WINDOWS-6F874NS:~$ swipl --version
> SWI-Prolog version 8.3.10 for x86_64-linux
> 
> ```
> 
> Verify current directory
> 
> ```bash
> eric@WINDOWS-6F874NS:~$ pwd
> /home/eric
> 
> ```
> 
> Make directory for development
> 
> ```bash
> eric@WINDOWS-6F874NS:~$ mkdir -p projects/SWI-Prolog/helloWord && cd projects/SWI-Prolog/helloWord
> eric@WINDOWS-6F874NS:~/projects/SWI-Prolog/helloWord$
> 
> ```
> 
> Make simple `Hello World` style predicate for demonstration purposes
> 
> ```bash
> eric@WINDOWS-6F874NS:~/projects/SWI-Prolog/helloWord$ echo ":- write('Hello from SWI-Prolog on Ubuntu on Windows\u0021\n')." > hello.pl
> 
> ```
> 
> Demonstrate predicate
> 
> ```bash
> eric@WINDOWS-6F874NS:~/projects/SWI-Prolog/helloWord$ swipl --quiet -g halt hello.pl
> Hello from SWI-Prolog on Ubuntu on Windows!
> 
> ```
> 
> Startup Visual Studio Code set to this directory
> 
> ```bash
> eric@WINDOWS-6F874NS:~/projects/SWI-Prolog/helloWord$ code .
> /mnt/c/Program Files/Microsoft VS Code/bin/code: 46: cannot create /tmp/remote-wsl-loc.txt: Permission denied
> Installing VS Code Server for x64 (d2e414d9e4239a252d1ab117bd7067f125afd80a)
> Downloading: 100%
> Unpacking: 100%
> Unpacked 2357 files and folders to /home/eric/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a.
> eric@WINDOWS-6F874NS:~/projects/SWI-Prolog/helloWord$
> 
> ```
> 
> In Visual Studio Code
> 
> Install extension: [VSC-Prolog](https://marketplace.visualstudio.com/items?itemName=arthurwang.vsc-prolog)
> 
> Using VS Code change to the extensions panel by clicking ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/3/34a816ec2e40755958bf78d517dc723155ba3a9a.png) in the left panel.  
> In the extensions search input ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/3/32fae30dd274e1ad80ff3af8cd938ec06a898195.png) enter `prolog`
> 
> ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/6/614f27c64812e157896185d4504a97ebb288406f.png)
> 
> For `VSC-Prolog` click ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/5/5fb0073e17e70be54220d6f87f3331bc9bd6c39c.png)
> 
> Switch the left panel back to the files view by clicking ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/3/31de43e07bc6187c6545438cc703fd1983548492.png)
> 
> Create file: `path.pl`
> 
> ```prolog
> % From: https://www.cpp.edu/~jrfisher/www/prolog_tutorial/2_15.html
> 
> edge(1,2).
> edge(1,4).
> edge(1,3).
> edge(2,3).
> edge(2,5).
> edge(3,4).
> edge(3,5).
> edge(4,5).
> 
> connected(X,Y) :- edge(X,Y).
> connected(X,Y) :- edge(Y,X).
> 
> path(A,B,Path) :-
> travel(A,B,[A],Q),
> reverse(Q,Path).
> 
> travel(A,B,P,[B|P]) :-
> connected(A,B).
> travel(A,B,Visited,Path) :-
> connected(A,C),
> C \== B,
> \+member(C,Visited),
> travel(C,B,[C|Visited],Path).
> 
> ```
> 
> Since there is invalid configuration for VSC-Prolog that is not allowing the linter to work, a output panel will open with the message:
> 
> `Cannot lint the prolog file. The Proog executable was not found. Use the ‘prolog.executablePath’ setting to configure
> 
> ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/5/5fc9af322a6bda1151b08dcdb98fea2ad0147c02.png)
> 
> > **To fix this**
> >
> > From the menu select `File` \> `Preferences` \> `Settings`
> > 
> > ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/a/a44b9d1392f4057d536c413e27c5b8f9b203e816.png)
> > 
> > For `Search settings` enter `prolog`
> > 
> > ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/c/c2131aaa0c1d7df16c0b1256f4f4ea1897963cf8.png)
> > 
> > Select `Remote [...]`
> > 
> > ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/6/6e9c4335191cc1c8977b7aaef093ee1260f500d8.png)
> > 
> > For `Prolog: Executable Path` remove `/usr/bin/siwpl` so that value is empty.  
> > ![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/2X/d/d37ff432b9243a462ddd0a7bc28c02b92cc3b4e7.png)
> > 
> > Close the `settings` panel
> 
> Open terminal (Ctrl+`)
> 
> Start SWI-Prolog
> 
> ```bash
> root@WINDOWS-6F874NS:~/projects/SWI-Prolog/helloWord# swipl
> Welcome to SWI-Prolog (threaded, 64 bits, version 8.3.10)
> SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
> Please run ?- license. for legal details.
> 
> For online help and background, visit https://www.swi-prolog.org
> For built-in help, use ?- help(Topic). or ?- apropos(Word).
> 
> ```
> 
> Consult file: `path.pl`
> 
> ```prolog
> ?- [path].
> true.
> 
> ```
> 
> List the predicate path
> 
> ```prolog
> ?- listing(path).
> path(A, B, Path) :-
> travel(A, B, [A], Q),
> reverse(Q, Path).
> 
> ```
> 
> Run the predicate path
> 
> ```prolog
> ?- path(1,5,P).
> P = [1, 2, 5] ;
> P = [1, 2, 3, 5] ;
> P = [1, 2, 3, 4, 5]
> ...
> 
> ```
> 
> Trace the predicate path
> 
> ```prolog
> ?- trace,path(1,5,P).
> Call: (11) path(1, 5, _30240) ? creep
> Call: (12) travel(1, 5, [1], _30780) ? creep
> Call: (13) connected(1, 5) ? creep
> Call: (14) edge(1, 5) ? creep
> Fail: (14) edge(1, 5) ? creep
> Redo: (13) connected(1, 5) ? creep
> Call: (14) edge(5, 1) ? creep
> Fail: (14) edge(5, 1) ? creep
> Fail: (13) connected(1, 5) ? creep
> Redo: (12) travel(1, 5, [1], _30780) ? creep
> Call: (13) connected(1, _31202) ? creep
> Call: (14) edge(1, _31202) ? creep
> Exit: (14) edge(1, 2) ? creep
> Exit: (13) connected(1, 2) ? creep
> Call: (13) 2\==5 ? creep
> Exit: (13) 2\==5 ? creep
> Call: (13) lists:member(2, [1]) ? creep
> Fail: (13) lists:member(2, [1]) ? creep
> Redo: (12) travel(1, 5, [1], _30780) ? creep
> Call: (13) travel(2, 5, [2, 1], _30780) ? creep
> Call: (14) connected(2, 5) ? creep
> Call: (15) edge(2, 5) ? creep
> Exit: (15) edge(2, 5) ? creep
> Exit: (14) connected(2, 5) ? creep
> Exit: (13) travel(2, 5, [2, 1], [5, 2, 1]) ? creep
> Exit: (12) travel(1, 5, [1], [5, 2, 1]) ? creep
> Call: (12) lists:reverse([5, 2, 1], _30240) ? creep
> Exit: (12) lists:reverse([5, 2, 1], [1, 2, 5]) ? creep
> Exit: (11) path(1, 5, [1, 2, 5]) ? creep
> P = [1, 2, 5] ;
> Redo: (14) connected(2, 5) ? 
> ...
> 
> ```
> 
> To use gtrace which uses X-windows a few system variables need to be configured.  
> Reference: [How to set up working X11 forwarding on WSL2](https://stackoverflow.com/a/61110604/1243762)
> 
> Edit `.bashrc`
> 
> Check for existing `export DISPLAY` and `export LIBGL_ALWAYS_INDIRECT`, there should be none. If there are some and they are not like the following edit, I have not idea on how to make the change.
> 
> At the end of the file add
> 
> ```plaintext
> export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0
> export LIBGL_ALWAYS_INDIRECT=1
> 
> ```
> 
> In the terminal with `swipl` running  
> halt swipl
> 
> Switch user to \<user\>
> 
> ```prolog
> root@WINDOWS-6F874NS:/home/eric# su eric
> eric@WINDOWS-6F874NS:~$
> 
> ```
> 
> Apply the changes to `.bashrc`
> 
> ```bash
> eric@WINDOWS-6F874NS:~$ . ~/.bashrc
> 
> ```
> 
> Start `swipl` again
> 
> ```bash
> eric@WINDOWS-6F874NS:~/projects/SWI-Prolog/helloWord$ swipl
> Welcome to SWI-Prolog (threaded, 64 bits, version 8.3.10)
> SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
> Please run ?- license. for legal details.
> 
> For online help and background, visit https://www.swi-prolog.org
> For built-in help, use ?- help(Topic). or ?- apropos(Word).
> 
> ?-
> 
> ```
> 
> Using SWI-Prolog verify predicate works
> 
> ```prolog
> [path].
> true.
> 
> ?- path(1,5,P).
> P = [1, 2, 5] ;
> P = [1, 2, 3, 5] ;
> P = [1, 2, 3, 4, 5] 
> ...
> 
> ```
> 
> Using SWI-Prolog use gtrace/0 with predicate which should automatically start up X-window with SWI-Prolog gtrace running in it.
> 
> ```prolog
> ?- gtrace,path(1,5,P).
> % The graphical front-end will be used for subsequent tracing
> P = [1, 2, 5] ;
> ...
> 
> ```
> 
> * * *
> 
> Errors (Included here so that they can be indexed by search engines such as Google)
> 
> ```prolog
> ?- gtrace,path(1,5,P).
> % The graphical front-end will be used for subsequent tracing
> [PCE fatal: @display/display: Failed to connect to X-server at `': no DISPLAY environment variable
> *********************************************************************
> * You MUST be running the X11 Windowing environment. If you are, *
> * check the setting of your DISPLAY environment variable as well *
> * the access rights to your X11 server. See xauth(1) and xhost(1). *
> *********************************************************************
> in: <No exception goal>
> ]
> Host stack:
> [15] pce_principal:send(@emacs_mark_list/emacs_bookmark_editor, append(new(_12646, dialog)))
> [14] Send-method on @emacs_mark_list/emacs_bookmark_editor: emacs_bookmark_editor->initialise
> [13] '$c_call_prolog'
> [12] pce_principal:new(@emacs_mark_list/emacs_bookmark_editor, emacs_bookmark_editor)
> [11] Send-method on @emacs/emacs: emacs->initialise(@emacs_buffers/dict)
> % The following threads wouldn't die: [main]
> 
> ```

> **Personal Notes**
>
> References:  
> [Official Images on Docker Hub](https://docs.docker.com/docker-hub/official_images/)  
> [Overview of Docker Compose](https://docs.docker.com/compose/)  
> [Develop with Docker](https://docs.docker.com/develop/)  
> [Guidelines for Linux package managers](https://www.swi-prolog.org/build/guidelines.html) - Why are executables named what they are, e.g. swipl, what are the types of packages that should be created, e.g. swi-prolog-nox  
> [Containers on Windows documentation](https://docs.microsoft.com/en-us/virtualization/windowscontainers/)  
> [Open Container Initiative](https://github.com/opencontainers) - Think Docker or VXD, this is open source.  
> [Deploy a registry server](https://docs.docker.com/registry/deploying/) - Think private DockerHub on PC  
> [What you need to know about upcoming Docker Hub rate limiting](https://www.docker.com/blog/what-you-need-to-know-about-upcoming-docker-hub-rate-limiting/)  
> [Checking Your Current Docker Pull Rate Limits and Status](https://www.docker.com/blog/checking-your-current-docker-pull-rate-limits-and-status/)  
> [The great Docker split](https://forums.docker.com/t/feedback-for-the-docker-team-docker-hub-rate-limiting-was-not-well-advertised/100282/3?u=clocks)  
> [Docker Newsletter](https://swi-prolog.discourse.group/t/does-pldoc-have-a-way-to-incorporate-unit-tests-akin-to-pythons-doctest/999)  
> [Introduction to Containers](https://container.training/intro-selfpaced.yml.html)  
> [systemctl failed to connect to bus - docker](https://askubuntu.com/questions/813588/systemctl-failed-to-connect-to-bus-docker-ubuntu16-04-container)  
> [A Practical Introduction to Container Terminology](https://developers.redhat.com/blog/2018/02/22/container-terminology-practical-introduction/)  
> [SO Docker tag info](https://stackoverflow.com/tags/docker/info)  
> [GoogleContainerTools](https://github.com/GoogleContainerTools)  
> [GoogleContainerTools](https://github.com/GoogleContainerTools)/[container-diff](https://github.com/GoogleContainerTools/container-diff)  
> [Docker Engine API (Using JSON data format)](https://docs.docker.com/engine/api/v1.40/#operation/PluginSet)  
> [How do I connect to the remote Docker Engine API? (Running on Windows OS)](https://docs.docker.com/docker-for-windows/faqs/#how-do-i-connect-to-the-remote-docker-engine-api)  
> [Using Docker Engine API securely](https://medium.com/trabe/using-docker-engine-api-securely-584e0882158e)  
> [Working with Docker APIs](https://nirajrules.wordpress.com/2019/08/30/working-with-docker-apis/)  
> [PSA: Beware of Exposing Ports in Docker](https://www.tripwire.com/state-of-security/devops/psa-beware-exposing-ports-docker/)  
> [How do you mount the docker socket on Windows?](https://stackoverflow.com/questions/57466568/how-do-you-mount-the-docker-socket-on-windows)  
> [Docker Tips : about /var/run/docker.sock](https://medium.com/better-programming/about-var-run-docker-sock-3bfd276e12fd)  
> [https://www.linuxserver.io/](https://www.linuxserver.io/) - We are a group of like minded enthusiasts from across the world who build and maintain the largest collection of Docker images on the web.  
> [linuxserver/code-server](https://hub.docker.com/r/linuxserver/code-server) - Code-server is VS Code running on a remote server, accessible through the browser.  
> [UNIX Domain Sockets](https://docs.oracle.com/cd/E19455-01/806-1017/6jab5di3d/index.html)  
> [UNIX domain sockets](https://troydhanson.github.io/network/Unix_domain_sockets.html)  
> [Unix domain sockets vs. internet sockets](https://lists.freebsd.org/pipermail/freebsd-performance/2005-February/001143.html)  
> [Play with Docker Classroom](https://training.play-with-docker.com/)  
> [Capture the X11 protocol’s traffic](https://unix.stackexchange.com/questions/192005/capture-the-x11-protocols-traffic)  
> [Gist](https://gist.github.com/nuxlli/7553996) using /var/run/docker.sock with [socat](https://linux.die.net/man/1/socat) and [nc](https://linux.die.net/man/1/nc).  
> [Docker Internals](https://docker-saigon.github.io/post/Docker-Internals/) - a blog.  
> [Docker Registry](https://docs.docker.com/registry/)  
> GitHub Docker [Registry](https://hub.docker.com/_/registry)  
> [Implementing a Self-Hosted Docker Registry on Raspberry Pi](https://volkanpaksoy.com/archive/2019/08/10/Implementing-a-Self-Hosted-Docker-Registry-on-Raspberry-Pi/)  
> [ubuntu running under WSL2 not seeing Docker daemon at unix:///var/run/docker.sock](https://github.com/docker/for-win/issues/5096) - Use `docker context ls` then `docker ps`  
> [Installing various versions of PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.1)  
> [Install .NET on Linux](https://docs.microsoft.com/en-us/dotnet/core/install/linux)  
> [Daemon socket option](https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-socket-option) - The Docker daemon can listen for Docker Engine API requests via three different types of Socket: unix, tcp, and fd.  
> [Update DISPLAY env for already running docker containers for X11 forwarding over SSH](https://forums.docker.com/t/update-display-env-for-already-running-docker-containers-for-x11-forwarding-over-ssh/100798/2?u=clocks)  
> [Manage sensitive data with Docker secrets](https://docs.docker.com/engine/swarm/secrets/)  
> [Best Docker Support Resources for Troubleshooting](https://success.mirantis.com/article/best-support-resources)  
> [Kubernetes is dropping Docker support?!](https://www.youtube.com/watch?v=0oVDPf8zPS0&list=UUR-DXc1voovS8nhAvccRZhg)  
> [Don’t Panic: Kubernetes and Docker](https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/)  
> [Dockershim Deprecation FAQ](https://kubernetes.io/blog/2020/12/02/dockershim-faq/)  
> [Kubernetes Documentation](https://kubernetes.io/docs/home/)  
> [Introducing Container Runtime Interface (CRI) in Kubernete](https://kubernetes.io/blog/2016/12/container-runtime-interface-cri-in-kubernetes/)s  
> [Start coding in seconds on GitHub with Codespaces](https://github.blog/2020-05-06-new-from-satellite-2020-github-codespaces-github-discussions-securing-code-in-private-repositories-and-more/#codespaces)
> 
> * * *
> 
> Running both Windows and Linux containers at the same time
> 
> [Running Docker Windows and Linux Containers Simultaneously](https://devblogs.microsoft.com/premier-developer/running-docker-windows-and-linux-containers-simultaneously/) - As the blog is 2 years old this might have significantly changed, but this is the best article I have seen so far.  
> [Win10+Docker: Hybrid swarm on the Desktop](https://wsl.dev/hybridswarm/) - This one has more details but you need to link to other blogs to get even more of the detail. Have not tried this example yet.
> 
> * * *
> 
> Docker Desktop for Windows user manual - [resources](https://docs.docker.com/docker-for-windows/#resources)
> 
> > Configurations
> > 
> > - Linux containers in WSL 2 mode
> > - Linux containers in Hyper-V mode
> > - Windows containers.
> 
> * * *
> 
> [Windows base OS images](https://hub.docker.com/_/microsoft-windows-base-os-images) - These are Docker images that use the Windows OS and not a Linux OS. These only run on a host with a Windows OS installed as you need a Windows OS license and the Docker images use the license of the host OS.  
> [Windows container version compatibility](https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility?tabs=windows-server-20H2%2Cwindows-10-20H2)  
> [Windows 10 release information](https://docs.microsoft.com/en-us/windows/release-information/)
> 
> * * *
> 
> Software to compare Windows system snapshots  
> [8 Tools to Track Registry and File Changes by Comparing Before and After Snapshots](https://www.raymond.cc/blog/tracking-registry-and-files-changes-when-installing-software-in-windows/)  
> [docker diff](https://docs.docker.com/engine/reference/commandline/diff/) - Only does files names not contents of files such as log files or the registry.  
> SO Q&A [Docker difference between two containers](https://stackoverflow.com/questions/26230214/docker-difference-between-two-containers) - Comment notes: `export both containers, untar them and run a diff`
> 
> * * *
> 
> [Use Docker Compose](https://code.visualstudio.com/docs/containers/docker-compose)
> 
> > Also, for single-container scenarios, using Docker Compose provides tool-independent configuration in a way that a single Dockerfile does not. Configuration settings such as volume mounts for the container, port mappings, and environment variables can be declared in the docker-compose YML files.
> 
> * * *
> 
> Uses:  
> For teachers needing to help their students create their first tool-chain for a development environment. Also with Visual Studio Code in the mix and some associated extensions, the students can collaborate with each other or the teacher with the student(s), e.g. [Introducing Visual Studio Live Share](https://code.visualstudio.com/blogs/2017/11/15/live-share), [Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack), [Development Containers in Education: A Guide for Instructors](https://code.visualstudio.com/blogs/2020/07/27/containers-edu)
> 
> A current question is if a teacher wants to review and comment on the current code of a student, then where should the code be stored and how? Since each student could have a separate directory on a common server then how does the teacher bring up each students work and then quickly switch to the next students work without leaving the development environment?
> 
> See:  
> [Working with Containers](https://code.visualstudio.com/docs/remote/containers#_working-with-containers)  
> [Adding another local file mount](https://code.visualstudio.com/docs/remote/containers-advanced#_adding-another-local-file-mount)
> 
> > The Remote - Containers extension supports two primary operating models:
> > 
> > - You can use a container as your [full-time development environment](https://code.visualstudio.com/docs/remote/create-dev-container#_create-a-devcontainerjson-file).
> > - You can [attach to a running container](https://code.visualstudio.com/docs/remote/attach-container) to inspect it.
> 
> * * *
> 
> VS Code [Working with containers](https://code.visualstudio.com/docs/containers/overview)  
> [VS Code Remote Development](https://code.visualstudio.com/docs/remote/remote-overview)  
> [microsoft](https://github.com/microsoft)/[vscode-remote-try-java](https://github.com/microsoft/vscode-remote-try-java)  
> [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers)  
> [Remote development in Containers](https://code.visualstudio.com/docs/remote/containers-tutorial)  
> VS Code extension: [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh)  
> VS Code extension: [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)
> 
> * * *
> 
> [LXD](https://linuxcontainers.org/lxd/introduction/) is not the same as [Docker](https://www.docker.com/), but you can [try LXD online](https://linuxcontainers.org/lxd/try-it/)  
> [LXD vs Docker](https://www.educba.com/lxd-vs-docker/)  
> [List of Linux containers](https://en.wikipedia.org/wiki/List_of_Linux_containers)  
> [OS-level virtualization](https://en.wikipedia.org/wiki/OS-level_virtualization)  
> [Microservices](https://en.wikipedia.org/wiki/Microservices)

---

_[View the full topic](https://swi-prolog.discourse.group/t/wiki-discussion-use-swi-prolog-dockerhub-image/3098)._
