0

I am trying to setup a MariaDB in my CircleCI 2.0 build but I am having problems to find a documentation how to configure the MariaDB Docker container. Here is what I did so far.

version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/openjdk:9-jdk

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      - image: circleci/mariadb:10.3.4-ram
        environment:
          MARIADB_USER: username
          MARIADB_PASSWORD: pwd
          MARIADB_DB: test-db

I would like to define:

  • Database name
  • Database user
  • Database user password

Then I would like to create a database called test-db.

braaterAfrikaaner
  • 1,072
  • 10
  • 20
saw303
  • 8,051
  • 7
  • 50
  • 90

1 Answers1

1

The CircleCI MariaDB Docker image is based on the Docker Library image which you can find here, with instructions: https://hub.docker.com/_/mariadb/

In your case its

  - image: circleci/mariadb:10.3.4-ram
    environment:
       - MYSQL_DATABASE: test-db
       - MYSQL_USER: username
       - MYSQL_PASSWORD: pwd

Respectfully,

Ricardo N Feliciano
Developer Evangelist, CircleCI

saw303
  • 8,051
  • 7
  • 50
  • 90
FelicianoTech
  • 3,894
  • 2
  • 13
  • 18