docker exec -u root -ti myairflowcontainer bash to get a root shell inside a running container, or docker run -rm -ti -u root -entrypoint bash puckel/airflow to start a new container as root. Commit changes in Docker (i.e., docker commit). Use the passwd command to change the password. I wasn't really sure what are missing at this point. There isn't a password for any of the users in the container - there generally isn't in docker containers. To set the root password inside a Docker container: Log in as root: docker exec -ti -u root containerID /bin/bash. When you run the image you will run by default the airflow command which has a number of subcommands that can be executed. You have not copied the whole output of your command but this is a message you get when you try to run airflow without telling it what to do. Init db and scheduler both failed with : (MySQLdb._exceptions.OperationalError) (2005, "Unknown MySQL server host 'mock_mysql' (-2)") The 'GROUPORCOMMAND' message you got is the output of 'airflow' command. However from the healthcheck, mysql itself was failing with mysql_local | T04:29:04.011037Z 3 Access denied for user (using password: NO) i have my init.sql as CREATE DATABASE IF NOT EXISTS metastore ĬREATE USER IDENTIFIED BY 'localpassword' What is Astro Astro is a cloud solution that helps you focus on your data pipelines and spend less time managing Apache Airflow, with capabilities enabling you to build, run, and observe data all in one place. Since it's connecting to the metastore database, it will required to set up the database in mysql when the database is starting. Everything you need to know about Astronomerâs modern data orchestration tool for the cloud, powered by Apache Airflow. script/init.sql:/data/application/init.sql Discovered another way to set not only the user but also the group in a docker-compose.yml file which is NOT documented in the Docker Compose File Reference yamenk helpfully provides in the accepted answer. I have my docker-compose.yml as version: "3.9" Setting both a User AND a Group in docker-compose.yml. On Linux, the mounted volumes in container use the native Linux filesystem user/group permissions, so you have to make sure the container and host computer have matching file permissions. I have my mySQL connection string as in airflow.cfg Surprisingly, I had to take a look to the Airflow documentation. Required, but never shown Post Your Answer. I am trying to set up airflow in docker-compose with MySQL as backend. I connect to the container with following command (as root): docker exec -it -u root /bin/bash but when I try to update I got the following.Newbies for airflow and mysql settings here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |