DEV Community

Discussion on: Build NextJS Application Using GitHub Workflow and Docker

Collapse
 
behnamio profile image
behnam-io • Edited

Hi Yash, thanks for sharing this post. I tried to follow your steps, but getting error on "push" step in github workflow, any idea?

invalid argument "-t" for "-t, --tag" flag: invalid reference format
Enter fullscreen mode Exit fullscreen mode
Collapse
 
thakkaryash94 profile image
Yash Thakkar

Hey,
Probably because docker build -t is not tagging the image properly. Try to run docker images after docker build command. It will print all the docker images we build with name.

Collapse
 
behnamio profile image
behnam-io

I resolved it, was hillarious but docker wasn't recognizing "-" and caps in my repository name, changing repo name to lowercase and replacing "-" with "_" solved the problem; But I'm now facing another issue, I'm only able to pass "NEXT_PUBLIC" env variables, but some libs like "next-auth" only accept some hardcoded variables like "NEXTAUTH_URL", is there anyway to solve this as well?