Building a Docker container using Gitlab CI Docker runner
Weird Docker. I changed the WORKDIR in the Dockerfile and it worked:

FROM postgres:9.6

WORKDIR /builds/user/
ADD repo/script.sql /docker-entrypoint-initdb.d/


EDIT
The /builds folder does not exist on the host system. I thought that adding it to the runner's config would create a volume container that would be shared between containers. But no. So I removed it from the runner config, /etc/gitlab-runner/config.toml:

[[runners]]
  name = "My Docker Runner"
  url = "http://host"
  token = "xxxxxxxxxxxxxxxxxxxx"
  executor = "docker"
  [runners.docker]
    tls_verify = false
    image = "docker:latest"
    privileged = false
    disable_cache = false
    volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache"]
  [runners.cache]