title: Why docker does not find Env variable to JSON file in the docker container?
body: <p>I have problems when I want to add a environmental variable with the path to a JSON file as credentials for <code>GOOGLE_APPLICATION_CREDENTIALS</code></p>
  <p>My filesystem is this:</p>
  <pre><code>Dockerfile
  -app
     main.go
     -domain
       go files inside domain folder
     -repositories
       go files inside repositories folder
       firebase-services.json file credentials inside repositories folder
  -ui
    html, css, js &amp; images inside ui folder
  
  </code></pre>
  <p>My <code>dockerfile</code> is</p>
  <pre><code>FROM golang:alpine
  
  # Set necessary environmet variables needed for our image
  ENV GO111MODULE=on \
      CGO_ENABLED=0 \
      GOOS=linux \
      GOARCH=amd64 \
      GIN_MODE=release \
      GOOGLE_APPLICATION_CREDENTIALS='/build/app/repositories/firebase-services.json'
  
  # Copy the code into the container
  COPY ui /ui/
  
  # Move to working directory /build
  WORKDIR /build
  
  # Copy the code from /app to the build folder into the container
  COPY app .
  
  # Configure the build (go.mod and go.sum are already copied with prior step)
  RUN go mod download
  
  # Build the application
  RUN go build -o main .
  
  WORKDIR /app
  
  # Copy binary from build to main folder
  RUN cp /build/main .
  
  # Export necessary port
  EXPOSE 8000
  
  # Command to run when starting the container
  CMD [&quot;/app/main&quot;]
  </code></pre>
  <p>I tried everything in <code>GOOGLE_APPLICATION_CREDENTIALS</code>, put the relative path, the full path (in my computer), the build folder that I am creating... But when I run the container,  always get the answer of <code>Failed to create client: dialing: google: error getting credentials using GOOGLE_APPLICATION_CREDENTIALS environment variable: open /build/app/repositories/firebase-services.json: not a directory</code></p>
  <p>What I am missing? What should be the path?</p>