Code tests may come without infrastructure. Here’s how I’d create their environment:

nodeJS

docker run -it --name quiknode -v "$PWD":/usr/src/app -w /usr/src/app node node [index.js]
#don't use --rm as re-generation takes time

source

nodeJS

docker build -t quiknode .
docker run -it quiknode
docker start `docker ps -q -n1`
docker exec -it `docker ps -q -n1` node
node code.js

sqlite

docker run -name lpdb -v /host/db/local-db:/tmp/hi -it nouchka/sqlite 

mySQL

docker run --name=lpdb -d mysql/mysql-server:8.0
docker logs lpd 2>&1 | grep GENERATED
docker exec -it lpd mysql -uroot -p 
#enter the pw from last cmd
ALTER USER 'root'@'localhost' IDENTIFIED BY 'lppw';
CREATE DATABASE lpdb;
USE lpdb;
CREATE TABLE products (
    `id` MEDIUMINT AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `name` TINYTEXT,
    `description` MEDIUMTEXT);
INSERT INTO `products` (`name`,`description`) VALUES ("TV", "TV description");
INSERT INTO `products` (`name`,`description`) VALUES ("iPhone", "iPhone description");
INSERT INTO `products` (`name`,`description`) VALUES ("Android", "Android description");

source