Setup
The next step to getting Docker running in your development environment is to download and run the containers.
First, you need to authenitacte with the repository where the database container is saved.
This repository is located on AWS, so you will need to authenticate your local Docker desktop install with the remote AWS repository. You can do this by obtaining an API Access key from AWS.- Sign in to the AWS console here: https://898363003987.signin.aws.amazon.com/console
- Open the Identity and Access Management (IAM) dashboard by typing
IAMin the search bar and clicking on the top result. - Open the user list by clicking on the
Userslink.
- Click on your username in the list.
- Click on the
Security credentialstab.
- Under the
Access Keysheading, click on theCreate access keybutton.
- In the popup window, click on the
Download .csv filebutton.
Open the downloaded
accessKeys.csvfile in a text editor.Open a new git bash terminal in the
stariumxcvfolder.Configure the AWS CLI.
- Enter the configuration mode by running the following command:
aws configure - First, you will be prompted to enter your Access key id. The id is in the
accessKeys.csvfile you downloaded, on the second line (everything BEFORE the comma). - Copy the value from the .csv and paste it into your terminal by pressing Shift + Insert.
- Press Enter in your terminal to save the Access key id.
- Next, you will be prompted for the Secret access key. This key is in the
accessKeys.csvfile you downloaded, on the second line (everything AFTER the comma). - Copy the value from the .csv and paste it into your terminal by pressing Shift + Insert.
- Press Enter in your terminal to save the Secret access key.
- When prompted for the
Default region name, typeus-east-1and press Enter. - When prompted for the
Default output format, typejsonand press Enter.
The final result should look something like this (access key id and value removed for security reasons):
- Test that your API key is working by running the following command:
The output should look something like the following:aws ecr list-images --repository-name stariumxcv-dev{ "imageIds": [ { "imageDigest": "sha256:121361b3eedf1b730e25d0ff2e3594eb4f6c6accf6d336154eebd12a6d391422", "imageTag": "latest" } ] }
- Enter the configuration mode by running the following command:
Make sure you have the latest version of the
devbranch:git pullLog your Docker client into the stariumxcv-dev container registry by running the following command:
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 898363003987.dkr.ecr.us-east-1.amazonaws.com/stariumxcv-devIf the login was succesfull, you should see the following output:
Login SucceededCreate a new file in the
stariumxcvrepository with the following path:stariumxcv/build/secrets/db_root_password. NOTE: Notdb_root_password.txt!Open the new file and enter a password. IMPORTANT: YOUR PASSWORD CAN ONLY CONTAIN LETTERS AND NUMBERS!
Please note that we MUST set a root password for the database when using Docker, so this file cannot be empty.Open your
stariumxcv/functions/.env.php(NOTE: Notenv.php! If you don't have a.env.phpfile, please refer to the documentation here) file and update the values as follows (replacingPASSWORD_YOU_ENTERED_IN_STEP_8with its corresponding value):<?php // UNDER NO CIRCUMSTANCES SHOULD ".env.php" BE COMITTED TO THE GIT REPO $DB_USER = "root"; $DB_PASSWORD = "PASSWORD_YOU_ENTERED_IN_STEP_8"; $DB_HOST = "database"; $DB_NAME_ACCOUNTS = "gwythdarian_accounts"; $DB_NAME_EMAILS = "gwythdarian_emails"; $DB_NAME_MASTER = "master"; $DB_NAME_GAME = "stariumxcv_dev"; $STARIUMXCV_PRODUCTION = false;Open the Docker desktop client by right clicking on the docker icon in your taskbar:

Click on the
Settingsicon in the GUI:
Click on the
Resourcestab on the left:
Click on
FILE SHARING:
Select the drive from the list where your
stariumxcvfolder is located. In my case, this was driveS, but I went ahead and selected driveCas well for the purposes of this tutorial.
Click
Apply & Restartto restart the Docker daemon (not your computer).
Close out of the settings menu:

Test that everything up to here worked by running the game with the following command:
docker-compose up -dGo back to the Docker desktop client.
You should see the following in the GUI:

Finally, open the game in your browser by clicking on the
Open in browsericon in thestariumxcvdev_client_1container:
If everything worked correctly, you should now be able to login to the game, create a position, and start developing!
To learn more about using the Docker desktop GUI as well as Docker from the command line, go on to the next page.