Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
chuk-lo-code
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nisum-DevOps
chuk-lo-code
Commits
53d17780
Commit
53d17780
authored
Mar 04, 2022
by
Waqas Riaz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added README.md and Dockerfile for mariadb container images
parent
abc52975
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
README.md
databases/mariadb/README.md
+20
-0
mariadb.Dockerfile
databases/mariadb/mariadb.Dockerfile
+11
-0
No files found.
databases/mariadb/README.md
0 → 100644
View file @
53d17780
# Runnning Mariadb as docker
*
After CLoning this repo, go to mariadb folder under databases.
*
Run following command to build the docker image.
`docker build -t my-custom-db -f db.Dockerfile .`
*
The build image can be seen in the docker images list with below command.
`docker image ls`
*
Now create the docker container, also pass the necessary environment variables for initial settings. Following command is given as example.
`docker run -d --name my-custom-db -p 3306:3306 -e MYSQL_ROOT_PASSWORD=YOUR_ROOT_PASSWORD -e MYSQL_DATABASE=Devops -e MYSQL_USER=admin -e MYSQL_PASSWORD=YOUR_USER_PASSWORD db1`
*
MariaDB docker container is up and running.
\ No newline at end of file
databases/mariadb/mariadb.Dockerfile
0 → 100644
View file @
53d17780
# syntax=docker/dockerfile:1
FROM mariadb:focal
#Initialize and pre-populate the table from queries written in mytable.sql
COPY mytable.sql /docker-entrypoint-initdb.d/
#can be moved to docker run command and optionally docker-compose
VOLUME [ "/var/lib/mysql" ]
EXPOSE 3306
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment