TD Docker IMT Lille Nord Europe
88
App in JS to check connexion with Mysql/MariaDB
Source code : Jimmy Trackoen Gitlab
docker run -d --name Container_Name \
-e HOST=localhost \
-e DB_PORT=3306 \
-e USER=root \
-e PASSWORD=paswrd \
-p 8080:8080 \
cristol/docker-db-connection:1.0.0
version: '3.9'
services:
docker-db-connection:
container_name: Container_Name
ports:
- 8080:8080
environment:
- HOST=localhost
- DB_PORT=3306
- USER=root
- PASSWORD=paswrd
image: cristol/docker-db-connection:1.0.0
| Options | Default | Comments |
|---|---|---|
| -e HOST | localhost | No database are launched in this image, you must specify a HOST |
| -e DB_PORT | 3306 | |
| -e USER | root | Set a valid user (Mysql/MariaDB Credential) |
| -e PASSWORD | paswrd | Set a valid Password (Mysql/MariaDB Credential) |
| -p 8080:8080 | X |
if you see "Connection à la DB Failed" check state of your Mysql/MariaDB instance and / or your login crendentials
docker logs -f Container_Name
I also offer a light image created from alpine, it weighs 70MB, pull it with this tag 1.0.0-alpine
Cristol Bardou
Content type
Image
Digest
sha256:f187d4cde…
Size
25.9 MB
Last updated
over 3 years ago
docker pull cristol/docker-db-connection:1.0.0-alpine