Build Golang Projects

Hi folks,

I getting a trouble to build Golang projects with Gitlab. I’ve created a simple API to deploy using Docker image. My build works fine and Dokcer images is generated and published into AWS Service Registry, but when I try to run the container I get an error message from Docker.

Login Succeeded
contacts_v14: Pulling from wbpsdevops

0a8490d0dfd3: Already exists
4e02d6b72ee0: Pull complete
Digest: sha256:9df7cdcd2e06cb8c9f37548d459d7a41be346abfc2059d3a3f5d425454cdb97c
Status: Downloaded newer image for 232321281680.dkr.ecr.us-east-1.amazonaws.com/wbpsdevops:contacts_v14
Starting container contacts
4b3c158abd4bec4ed59edb1d24424a1d1bceff461914356ffc646b8d98e10c0a
docker: Error response from daemon: Container command ‘contacts’ not found or does not exist…

I tried to run Docker container directly from the command line to inspect if my Golang application is inside the container and it is.

When I download my artifact from Gitlab the binary does not works, but when I created it locally and put it into container using volume its works.

I’m using: Gitlab CE version 8.15.1 and Golang 1.7.3

Anyone can help me ? I appreciate.

Guys, thanks. But my problem is related to Alpine linux that uses musl instead of glibc, default for Golang compilation.