β οΈ WARNING
This guide assumes no prior knowledge and aims to help new Koha testers and developers on Linux get started using Koha Testing Docker and VSCode.
Don't forget to refer to the official Koha Testing Docker README too.
Windows users refer to Installing dependencies - Windows π¦Ύπ€
Linux users refer to Installing dependencies - Linux π¦Ύπ€
Required software β
- π» Terminal
- π³ Docker
- π VSCode
π§ TIP
The terminal is an essential tool. Get used to entering commands and take note of the different parts that make up this command. command --flags argument
It's important to get comfortable with the command line interface because through the course of this guide you may need to open multiple shells or kind of like in Inception open up shells inside of shells. π°π³οΈ
Check out this excellent Command Line Bootcamp by Eric Phetteplace.
To get started we will use the termianl to run some commands. Enter the following commands at the prompt that looks like this:
user@machine:~$
~ is the path for the user's home directory.
$ indicates the begining of the command prompt. If you see commands in guides that include the $ remember not to include that in your commands.
Now Let's ZSH some commands β
Update the systems package manager and install upgrades to installed software.
sudo apt update && sudo apt upgrade -yWhile you are doing this you might as well install Git too. You're gonna need it later. macOS instructions for installing Git
brew install gitSome basic commands β
Show the path of your present working directory
pwd/home/user/directoryMake a directory
mkdir myProjectcd myProjectYou can also chain commands together if you like
mkdir myProject && cd myProjectList files in the current directory
lsInstall Docker Desktop β
π INFO
Now when you launch the Terminal Docker will be available,
Some basic docker commands β
Check Docker version
docker -vDocker version 26.1.1, build 4cf5afaList Docker images
docker image lsIn the future when you have ktd setup you will get something like this:
REPOSITORY TAG IMAGE ID CREATED SIZE
koha/koha-testing main cfd51aaa102f 13 days ago 4.06GB
memcached <none> ec8c94e66592 2 weeks ago 99.7MB
memcached latest a4274125721c 2 weeks ago 84.9MB
koha/koha-testing <none> f8f95851bfcb 2 weeks ago 4.05GB
koha/koha-testing <none> 508d761224d7 2 weeks ago 4.05GB
memcached <none> 10895cbae220 6 weeks ago 84.9MB
mariadb 10.5 c65b1e141932 3 months ago 394MBClean up old docker images
docker system prune -aThis will remove all unused containers, networks, images and optionally, volumes if specified with the -v flag. Useful for troubleshooting sometimes.
Install VSCode β
π INFO
VSCode is a highly configureable text editor optimized for reading and writing code. It's pretty chill. βοΈ
β¨οΈ TIP
non-clicky wayLaunch VSCode
- Press
mackey, typetermand pressEnter
cd $PROJECTS_DIR
code .β¨οΈ TIP
non-clicky waycrtl+shift+~Open a new terminal inside VSCodectrl+pguporpgdnSwitch between terminals in VSCodectrl+jShow or hide the terminal window in VSCode