I am using a self hosted Gitlab-CE Server. I try to use a CI Pipeline with three stages: build, package, deploy
Build is a maven task - that works.
In the package task I try to build the docker container. But this step fails with the following error:
Error response from daemon: Dockerfile parse error line 1: unknown instruction: <!DOCTYPE
That is my .gitlab-ci.yml (Without deploy step)
image: docker:latest
services:
- docker:dind
variables:
SPRING_PROFILES_ACTIVE: gitlab-ci
stages:
- build
- package
- deploy
maven-build:
image: maven:3-jdk-8
stage: build
script: "mvn package -B"
artifacts:
paths:
- target/*.jar
docker-build:
stage: package
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN https://devel.priv.net
- docker build -t https://devel.priv.net/d.p/service-discovery
- docker push https://devel.priv.net/d.p/service-discovery
The gitlab Server can be reached at https://devel.priv.net. The Repository is https://devel.priv.net/d.p/service-discovery It is protected via username and password.
What is wrong in my configuration?