run in docker container error
I can run my project localhost without any issues, but it compile error when I run it in a Docker container. Could someone help me figure out why this might be happening
19 Replies
⌛
This post has been reserved for your question.
Hey @noreva! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
It can't autowire the websecurityconfig. Did you take a look at that part of the code?
How do you run the same project, not in Docker? Have you tried running it as a packaged jar?
Like, you might be running it with commandline parameters that you didn't put in the docker image.
Or it may have a config file it finds fine inside your project's folder layout, but which isn't packaged in images.
Many things like that may happen, so, details on how you run it.
I run it with IntelliJ. When it runs successfully, I build the Docker image again
I'd try running it as a standalone jar in a neutral directory, from commandline
Yes but i don't find anything wrong
It shows the same error as in Docker, and I’m not sure why
Check whether files that need to be there for your project, are in the jar. I'd first suspect .properties files
"already there"? What are you showing?
i find .properties file need to be in my project, are in the jar
I think there’s an issue with my security file configuration
how i autowired
Okay if you're sure, but I have no idea how does your screenshot shows that
Anyway, I don't know what I was thinking. You have access to the full stacktrace, so look at the last cause
this is full
Hmm. ClassGraph that doesn't give helpful information when it fails, that's a rather odd situation. Are your libs old? Are you using a lib that's not typically used in web projects?
Hmm, I have built it successfully in a neutral directory with the help of Claude AI.
It needs to change the content of the pom file
let me run with docker
By all means, don't hesitate to make that even vaguer
@Kyo-chan When I build my project with Docker and it fails, then I build it again and it succeeds. Is that normal?
No, that doesn't fall under normalcy. Every time I've worked with Docker, it was supposed to work the first time directly
Do you know what it is wrong with my frontend?
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.