Skip to content

refactor dockerfile, go modules with golang v1.14.2; closes #163#165

Open
BOPOHA wants to merge 2 commits intotravisjeffery:masterfrom
BOPOHA:issue_163
Open

refactor dockerfile, go modules with golang v1.14.2; closes #163#165
BOPOHA wants to merge 2 commits intotravisjeffery:masterfrom
BOPOHA:issue_163

Conversation

@BOPOHA
Copy link
Copy Markdown

@BOPOHA BOPOHA commented Apr 27, 2020

  • removed dep-related comands and notes

  • added two Dockerfiles (works with Podman, Buildah too)

    • "prod": for clean build, with tests, runnng with non-root user, from scratch container
    • "dev": there is caching for golang deps, without tests, run as root, and result container can be not from scratch, for debug reasons.
  • docker-compose file:

    • added shared context-build block, DRY.
    • removed command name jocko in line command: jocko broker... because of we are using the same ENTRYPOINT in docker file.
  • small fixes in module paths:

    • "github.com/hashicorp/consul/testutil/retry" -> "github.com/hashicorp/consul/sdk/testutil/retry"
  • update go.mod to the lastest version for all transitive deps (exepts github.com/mitchellh/go-testing-interface v1.4.0)

BOPOHA added 2 commits April 27, 2020 03:21
…ffery#163"

- removed dep-related comands and notes
- added two Dockerfiles (works with Podman, Buildah too)
  - "prod": for clean build, with tests, runnng with non-root user, from scratch container
  - "dev":  there is caching for golang deps, without tests, run as root, and result container can be not from scratch, for debug reasons.
- docker-compose file:
  - added shared context-build block, DRY.
  - removed command name `jocko` in line `command: jocko broker...` because of we using the same ENTRYPOINT in docker file.

- small fixes in module paths:
  - "github.com/hashicorp/consul/testutil/retry" -> "github.com/hashicorp/consul/sdk/testutil/retry"

- update go.mod to the lastest version for all transitive deps (exepts github.com/mitchellh/go-testing-interface v1.4.0)
Downgrading github.com/mitchellh/go-testing-interface for supporting previous version Golang v1.13, not only v1.14
This version does not implement `Cleanup` and `Parallel` methods.

##[error]jocko/broker_test.go:446:27: cannot use t (type *"testing".T) as type "github.com/mitchellh/go-testing-interface".T in argument to NewTestServer:
	*"testing".T does not implement "github.com/mitchellh/go-testing-interface".T (missing Cleanup method)
@travisjeffery
Copy link
Copy Markdown
Owner

@BOPOHA this looks good tho i don't think we should run the tests in the main dockerfile, maybe create a separate one called Dockerfile-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants