Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile generated by 'buffalo new' doesn't work #1912

Open
jwlogemann opened this issue Feb 27, 2020 · 2 comments
Open

Dockerfile generated by 'buffalo new' doesn't work #1912

jwlogemann opened this issue Feb 27, 2020 · 2 comments

Comments

@jwlogemann
Copy link

@jwlogemann jwlogemann commented Feb 27, 2020

Description

I;m trying to build a docker container for an application generated by 'buffalo new'. It errors with
Step 9/17 : RUN go get ./... ---> Running in da690716f2bd # github.com/gobuffalo/buffalo/plugins/plugdeps ../github.com/gobuffalo/buffalo/plugins/plugdeps/plugin.go:15:11: undefined: meta.BuildTags

which seems related to this issue: #1855

It seems like the buffalo builder image does not have modules enabled by default, and that's causing the error.

Steps to Reproduce the Problem

Run docker build . -t foobar

Expected Behavior

I expect it to build a Docker container

Actual Behavior

It errors with
Step 9/17 : RUN go get ./... ---> Running in da690716f2bd # github.com/gobuffalo/buffalo/plugins/plugdeps ../github.com/gobuffalo/buffalo/plugins/plugdeps/plugin.go:15:11: undefined: meta.BuildTags

Info

Please run buffalo info and paste the information below where it says "PASTE_HERE".

-> Go: Checking installation ✓ The go executable was found on your system at: /usr/local/go/bin/go -> Go: Checking minimum version requirements ✓ Your version of Go, 1.13.7, meets the minimum requirements. -> Go: Checking Package Management ⚠ You do not appear to be using Go Modules. * Go Modules (Recommended) - https://gobuffalo.io/en/docs/gomods For help setting up your Go environment please follow the instructions for you platform at: https://www.gopherguides.com/courses/preparing-your-environment-for-go-development -> Go: Checking PATH ✓ Your PATH contains /go/bin. -> Node: Checking installation ✓ The node executable was found on your system at: /usr/bin/node -> Node: Checking minimum version requirements ✓ Your version of Node, v10.19.0, meets the minimum requirements. -> NPM: Checking installation ✓ The npm executable was found on your system at: /usr/bin/npm -> NPM: Checking minimum version requirements ✓ Your version of NPM, 6.13.4, meets the minimum requirements. -> Yarn: Checking installation ✓ The yarnpkg executable was found on your system at: /usr/bin/yarnpkg -> Yarn: Checking minimum version requirements ✓ Your version of Yarn, 1.22.0, meets the minimum requirements. -> PostgreSQL: Checking installation ✘ The postgres executable could not be found on your system. For help setting up your Postgres environment please follow the instructions for you platform at: https://www.postgresql.org/download/ -> MySQL: Checking installation ✘ The mysql executable could not be found on your system. For help setting up your MySQL environment please follow the instructions for you platform at: https://www.mysql.com/downloads/ -> SQLite3: Checking installation ✓ The sqlite3 executable was found on your system at: /usr/bin/sqlite3 -> SQLite3: Checking minimum version requirements ✓ Your version of SQLite3, 3.27.2, meets the minimum requirements. -> Cockroach: Checking installation ✘ The cockroach executable could not be found on your system. For help setting up your Cockroach environment please follow the instructions for you platform at: https://www.cockroachlabs.com/docs/stable/ -> Buffalo (CLI): Checking installation ✓ The buffalo executable was found on your system at: /go/bin/buffalo -> Buffalo (CLI): Checking minimum version requirements ✓ Your version of Buffalo (CLI), v0.15.5, meets the minimum requirements. -> Buffalo: Application Details Pwd /go/src/fkc Root /go/src/fkc GoPath /go PackagePkg fkc ActionsPkg fkc/actions ModelsPkg fkc/models GriftsPkg fkc/grifts WithModules true Name fkc Bin bin/fkc VCS git WithPop true WithSQLite false WithDep false WithWebpack true WithNodeJs true WithYarn true WithDocker true WithGrifts true AsWeb true AsAPI false InApp true PackageJSON {map[build:webpack -p --progress dev:webpack --watch]} -> Buffalo: config/buffalo-app.toml name = "fkc" bin = "bin/fkc" vcs = "git" with_pop = true with_sqlite = false with_dep = false with_webpack = true with_nodejs = true with_yarn = true with_docker = true with_grifts = true as_web = true as_api = false -> Buffalo: config/buffalo-plugins.toml [[plugin]] binary = "buffalo-pop" go_get = "github.com/gobuffalo/buffalo-pop" -> Buffalo: go.mod module fkc go 1.14 require ( github.com/gobuffalo/buffalo v0.14.11 github.com/gobuffalo/buffalo-pop v1.23.1 github.com/gobuffalo/envy v1.9.0 github.com/gobuffalo/fizz v1.9.8 // indirect github.com/gobuffalo/flect v0.2.1 // indirect github.com/gobuffalo/genny v0.6.0 // indirect github.com/gobuffalo/mw-csrf v0.0.0-20190129204204-25460a055517 github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130 github.com/gobuffalo/mw-i18n v0.0.0-20190129204410-552713a3ebb4 github.com/gobuffalo/mw-paramlogger v0.0.0-20190129202837-395da1998525 github.com/gobuffalo/packd v1.0.0 // indirect github.com/gobuffalo/packr/v2 v2.7.1 github.com/gobuffalo/pop v4.13.1+incompatible github.com/gobuffalo/suite v2.8.2+incompatible github.com/gobuffalo/validate v2.0.4+incompatible // indirect github.com/markbates/grift v1.1.0 github.com/pkg/errors v0.9.1 // indirect github.com/unrolled/secure v0.0.0-20190103195806-76e6d4e9b90c )

@jwlogemann

This comment has been minimized.

Copy link
Author

@jwlogemann jwlogemann commented Feb 27, 2020

On further inspection the problem seems to be in line 13 of the generated Dockerfile:

ENV GO111MODULES=on

should be

ENV GO111MODULE=on

(Without the 'S')

@williamhgough

This comment has been minimized.

Copy link

@williamhgough williamhgough commented Mar 4, 2020

Had this same issue and fixed with above, was just coming to see if anybody else had reported the issue, thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.