Skip to content

Instantly share code, notes, and snippets.

@StalinMazaEpn
Last active August 3, 2024 21:20
Show Gist options
  • Save StalinMazaEpn/becdac2dc6e271e9d67b256229a78ca3 to your computer and use it in GitHub Desktop.
Save StalinMazaEpn/becdac2dc6e271e9d67b256229a78ca3 to your computer and use it in GitHub Desktop.
DockerShortcuts
## Database connection
mysql://host.docker.internal:3306
# Run MySQL on Docker
docker run --net=host --env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env=MYSQL_ROOT_PASSWORD=12345 -p 3306:3306 --volume=/var/lib/mysql:/var/lib/mysql:rw --detach --name=smdev mysql
## Build Image and run it
docker build -t portalbackv2 .
docker run --name imageportalbackv2 -p 8080:8080 portalbackv2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment