Error when starting custom Airflow Docker Image GROUP_OR_COMMAND

  airflow, docker

I created a custom image with the following Dockerfile:

FROM apache/airflow:2.1.1-python3.8
USER root

RUN apt-get update 
  && apt-get -y install gcc gnupg2 
  && curl | apt-key add - 
  && curl > /etc/apt/sources.list.d/mssql-release.list

RUN apt-get update 
  && ACCEPT_EULA=Y apt-get -y install msodbcsql17 
  && ACCEPT_EULA=Y apt-get -y install mssql-tools

RUN echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc 
  && echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc 
  && source ~/.bashrc

RUN apt-get -y install unixodbc-dev 
  && apt-get -y install python-pip 
  && pip install pyodbc

RUN echo -e “AIRFLOW_UID=$(id -u) nAIRFLOW_GID=0” > .env

USER airflow

The image creates successfully, but when I try to run it, I get this error:
"airflow command error: the following arguments are required: GROUP_OR_COMMAND, see help above."

I have tried supplying a group ID with the –user, but I can’t figure it out.

How can I start this custom Airflow Docker image?


Source: Docker Questions