From 4b0c2b05af40ad308a3d171ad8b88335630b47a1 Mon Sep 17 00:00:00 2001 From: Neil-Jocelyn Schark <neil-jocelyn.schark@stud.h-da.de> Date: Sat, 19 Jun 2021 23:51:25 +0200 Subject: [PATCH] moved apt commands further to the beginning --- Dockerfile | 6 ++++-- cmd/root.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index b8a7b9cab..5e3242115 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,12 @@ FROM golang:1.16-buster AS builder ARG GITLAB_USER ARG GITLAB_TOKEN ARG BUILDARGS -WORKDIR /src/gosdn -COPY . . + RUN apt-get update && apt-get install -y git RUN git config --global url."https://$GITLAB_USER:$GITLAB_TOKEN@code.fbi.h-da.de".insteadOf "https://code.fbi.h-da.de" + +WORKDIR /src/gosdn +COPY . . RUN GOOS=linux go build $BUILDARGS ./cmd/gosdn FROM debian:latest diff --git a/cmd/root.go b/cmd/root.go index 6cd3ea845..d856176ae 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -86,7 +86,7 @@ func init() { rootCmd.Flags().StringVar(&grpcPort, "grpc-port", "55055", "port for gRPC NBI") } -// initConfig reads in config file and ENV variables if set. +// initConfig reads in config file and ENV variables if set func initConfig() { if cfgFile != "" { // Use config file from the flag. -- GitLab