From 07e3d431b91536711a91e249359da02049a99f74 Mon Sep 17 00:00:00 2001 From: Vyacheslav Voronenko Date: Mon, 27 May 2019 16:43:11 +0200 Subject: [PATCH 1/3] adjusted docker compose --- Dockerfile | 4 +++- init.sh | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 init.sh diff --git a/Dockerfile b/Dockerfile index d013689..1201dc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ FROM debian:stretch ADD build/trafficmirror /trafficmirror +ADD ./init.sh /init +RUN chmod +x /init -CMD ["trafficmirror"] +CMD ["/init"] EXPOSE 8080 diff --git a/init.sh b/init.sh new file mode 100755 index 0000000..45b048a --- /dev/null +++ b/init.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +LISTEN_PORT=${LISTEN_PORT:-7077} +MAIN=${MAIN:-localhost:8888} +EXTRA_PARAMS=$1 + +echo /trafficmirror /trafficmirror -listen ":${LISTEN_PORT}" -main=${MAIN} $EXTRA_PARAMS +/trafficmirror -listen ":${LISTEN_PORT}" -main=${MAIN} $EXTRA_PARAMS From 37958924096fd36a3a233f50a2566be0913fae11 Mon Sep 17 00:00:00 2001 From: Vyacheslav Voronenko Date: Mon, 27 May 2019 16:45:17 +0200 Subject: [PATCH 2/3] adjusted family name --- .gitlab-ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 40ba12a..d0277da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,11 @@ variables: GL_URL: github.com/rb3ckers GO_PROJECT_NAMESPACE: trafficmirror - IMAGE_FAMILY: voronenko/trafficmirror + IMAGE_FAMILY: stackstate/trafficmirror CI_REGISTRY: docker.io .prep_go: &prep_go before_script: -# - export GL_URL=$(echo ${CI_PROJECT_URL:-https://github.com/rb3ckers/trafficmirror} | awk -F/ '{print $3}') - echo export GO_PROJECT_PATH="$GOPATH/src/$GL_URL/$GO_PROJECT_NAMESPACE" - export GO_PROJECT_PATH="$GOPATH/src/$GL_URL/$GO_PROJECT_NAMESPACE" - rm -rf $GOPATH/src/$GL_URL @@ -18,7 +17,6 @@ variables: stages: - build - docker_build -# - taglatest go_build: <<: *prep_go @@ -43,8 +41,7 @@ docker_build: services: - docker:dind script: -# - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker build -t $IMAGE_FAMILY:${CI_COMMIT_TAG:-dirty} . - echo docker push $IMAGE_FAMILY:${CI_COMMIT_TAG:-dirty} - - docker push $IMAGE_FAMILY:${CI_COMMIT_TAG:-dirty} \ No newline at end of file + - docker push $IMAGE_FAMILY:${CI_COMMIT_TAG:-dirty} From ebf530e2a38455334909b052fe8fef3e8566cf43 Mon Sep 17 00:00:00 2001 From: Vyacheslav Voronenko Date: Mon, 27 May 2019 17:11:21 +0200 Subject: [PATCH 3/3] PR comments --- Gopkg.toml | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/Gopkg.toml b/Gopkg.toml index b1802e7..6538be0 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -1,29 +1,3 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - [[constraint]] name = "github.com/sony/gobreaker"