Last active
November 14, 2023 07:00
-
-
Save fazaio/5957aaf7f0c143a51a208135316133e2 to your computer and use it in GitHub Desktop.
Docker shortcut
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create Image from Dockerfile | |
docker build --tag trenbox:1.0 . | |
Create Container from Image | |
docker container create --name mycontainer -p 80:80 dokcerimages | |
Seting ENV (!!! the env must before image) | |
docker container create --name superserver -p 1337:1337 -e JWT_TOKEN='testing' node-javasuper | |
[ compose phpmyadmin+mysql ] | |
version: "3.3" | |
services: | |
db: | |
image: mysql:latest | |
volumes: | |
- ./db_data:/var/lib/mysql | |
restart: always | |
ports: | |
- "3306:3306" | |
environment: | |
MYSQL_ROOT_PASSWORD: temp123 | |
MYSQL_DATABASE: db | |
MYSQL_PASSWORD: temp123 | |
phpmyadmin: | |
depends_on: | |
- db | |
image: phpmyadmin/phpmyadmin | |
restart: always | |
ports: | |
- "8090:80" | |
environment: | |
PMA_HOST: db | |
MYSQL_ROOT_PASSWORD: temp123 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment