I have a Dockerfile trying to package and deploy a web app to a container. The code of app fetches from git repository during Docker image building. Here\'s the Dockerfile s
for anyone who has this problem with Gitlab repositories:
Gitlab has this annoying branch id method when calling their API, the ID will appear under your repository name
# this will copy the last change from your brach and it'll invalidate the cache if there was a new change
ADD "https://gitlab.com/api/v4/projects/${PROJECT_ID}/repository/branches/master?private_token=${GIT_TOKEN}" /tmp/devalidateCache
# the actual clone
RUN git clone --depth=1 https://${GIT_USER}:${GIT_TOKEN}@gitlab.com/${git_file_uri} ${BASE_BUILD_PATH}