title: Visual Studio Code - Remote Containers - UID Issue
body: <p>I am using a standard airflow image as the base image for a custom Airflow image. I then use the custom Airflow image as the image for Visual Studio Code Remote Containers. The problem I am facing are permissions issues on the workspace folder or the AIRLOW_HOME directory depending on the configuration.</p>
  <p>The standard Airflow image uses the following UID when creating the base image</p>
  <pre><code>ARG AIRFLOW_UID=&quot;50000&quot;
  </code></pre>
  <p>The workspace folder is mounted as my host user with the ID of 1000. Here is my devcontainer configuration which says use the airflow account when running all the Visual Studio Code processes including terminal sessions but do not change the UID of the airflow user.</p>
  <pre><code>{
  &quot;build&quot;: {
      &quot;dockerfile&quot;: &quot;Dockerfile&quot;,
      &quot;args&quot;: {
          &quot;BASE_AIRFLOW_IMAGE&quot;: &quot;apache/airflow:2.2.5-python3.8&quot;
      }
  },
  &quot;extensions&quot;: [
      &quot;ms-python.python&quot;
  ],
  &quot;containerEnv&quot;: {
      &quot;AIRFLOW__CORE__DAGS_FOLDER&quot;: &quot;${containerWorkspaceFolder}&quot;
  },
  &quot;runArgs&quot;: [
      &quot;--network=host&quot;
  ],
  &quot;postStartCommand&quot;: &quot;airflow db init&quot;,
  &quot;remoteUser&quot;: &quot;airflow&quot;,
  &quot;updateRemoteUserUID&quot;: false
  </code></pre>
  <p>}</p>
  <p>So the issue for me is that workspace files are owned by the host user which has a UID of 1000. If I set the flag  to true then the AIRFLOW home directory which is owned by 50000 fails to to be writable.</p>
  <p>What I have not done:</p>
  <ul>
  <li>Set the AIRFLOW HOME directory to be a folder in the workspace and set updateRemoteUserUID to true so that the AIRFLOW user gets a UID of 1000.</li>
  <li>Write a build time script that changes the ownership of the AIRFLOW_HOME directory and the contained filesto the UID of 1000</li>
  </ul>
  <p>What I did do is on the host machine just set the UID of the files to be 50000.</p>
  <p>Any suggestions on how to deal with this?</p>