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

new --api results in not working docker build #1839

Open
yannick opened this issue Nov 20, 2019 · 3 comments
Open

new --api results in not working docker build #1839

yannick opened this issue Nov 20, 2019 · 3 comments

Comments

@yannick
Copy link

@yannick yannick commented Nov 20, 2019

steps to reproduce:
go get -u -v -tags sqlite github.com/gobuffalo/buffalo/buffalo
buffalo new myproject --api
cd myproject
docker build .
error:
->
package myproject/actions: unrecognized import path "myproject/actions" (import path does not begin with hostname)

@yannick

This comment has been minimized.

Copy link
Author

@yannick yannick commented Nov 20, 2019

the reason is that the WORKDIR in the Dockerfile is set to the name of the directory where buffalo new was run in vs. the name of the project.

@dschulz

This comment has been minimized.

Copy link

@dschulz dschulz commented Nov 21, 2019

I just noticed the same problem. It's due to a typo in the Dockerfile this line

ENV GO111MODULES=on

It should be GO111MODULE (without the 'S'):

ENV GO111MODULE=on 

I tried to find the template or file from which the Dockerfile file is generated but I couldn't find any instances of GO111MODULES (with an 's') in it in the repo.

@dschulz

This comment has been minimized.

Copy link

@dschulz dschulz commented Nov 21, 2019

I also replaced the line:

RUN go get ./...

for

RUN go mod tidy

The docker image is built without problems after that, but I can't confirm this last change had any effect. The real problem is the typo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.