Azure / Azure-Data-Factory-Integration-Runtime-in-Windows-Container

Azure Data Factory Integration Runtime in Windows Container Sample
MIT License
25 stars 36 forks source link

How are local files supposed to work? #22

Open mhegreberg opened 5 months ago

mhegreberg commented 5 months ago

I've got SHIR in a windows container, and I mounted the files it needs as a local volume. how do I make azure data factory see them?

it seems azure data factory requires a username/password, even for files local to the SHIR, so I modified the dockerfile to create a user, but it can't read anything. am I missing something?

dockerfile changes:

FROM mcr.microsoft.com/windows/servercore:ltsc2022
ARG INSTALL_JDK=false

# Download the latest self-hosted integration runtime installer into the SHIR folder
COPY SHIR C:/SHIR/

RUN ["powershell", "C:/SHIR/build.ps1"]

# Allow local folder Navigation
RUN ["powershell", "'C:/Program Files/Microsoft Integration Runtime/6.0/Shared/dmgcmd.exe -DisableLocalFolderPathValidation'"]

RUN mkdir "C:/data"

RUN net user dataUser '(PASSWORD_HERE)' /ADD

RUN ["icacls", "C:/data", "/grant", "dataUser:(OI)(CI)F"]

ENTRYPOINT ["powershell", "C:/SHIR/setup.ps1"]

ENV SHIR_WINDOWS_CONTAINER_ENV True

HEALTHCHECK --start-period=120s CMD ["powershell", "C:/SHIR/health-check.ps1"]

I then run the container with the following docker compose:

services:
  shir:
    image: shir
    build: "B:/docker/MSSHIR/Azure-Data-Factory-Integration-Runtime-in-Windows-Container-main"
    volumes:
      - type: bind
        source: "B:/data/"
        target: "C:/data"
    environment:
      AUTH_KEY: "(Auth_Key)"
      NODE_NAME: "shir"
      ENABLE_AE: true
      ENABLE_HA: true

is anyone else using local files this way? I'm pulling my hair out, this feels much easier with linux containers.