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

[Bug Report] Dockerfile fails to build from master and v0.26.2 tag on Windows #318

Closed
tylercamp opened this issue Jul 9, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@tylercamp
Copy link

tylercamp commented Jul 9, 2022

Describe the bug
Attempting to build a docker image fails with error:

#13 100.8 Using sanitize (0.1.0 at e09520e)
#13 100.8 crystal build src/mango.cr --release --progress --static --error-trace
#13 101.0 In src/mango.cr:1:1
#13 101.0
#13 101.0  1 | require "./config"
#13 101.0      ^
#13 101.0 Error: while requiring "./config"
#13 101.0
#13 101.0
#13 101.0 In src/config.cr:50:58
#13 101.0
#13 101.0  50 | puts "The config file #{cfg_path} does not exist. " \
#13 101.0                                                            ^
#13 101.0 Error: unknown token: '\r'
make: *** [Makefile:18: static] Error 1

To Reproduce
Clone the repo and run docker build -t XYZ .

Environment (please complete the following information):

  • OS: Windows 11, using Docker with WSL 2 backend
  • Mango Version: master, v0.26.2

Docker (if you are running Mango in a Docker container)

  • I've copied the env.example file and renamed to .env, no modifications

Additional context
I'm attempting to build the image myself so I can add an EXPOSE 9000 line to the Dockerfile; explicit EXPOSE is needed in the docker image for Traefik which auto-detects ports for containers and exposes them behind HTTPS.

I've not tried older tags.

@tylercamp tylercamp added the bug Something isn't working label Jul 9, 2022
@hkalexling
Copy link
Member

Windows line breaks strike again :) Can you give #306 (comment) a try?

@tylercamp tylercamp changed the title [Bug Report] Dockerfile fails to build from master and v0.26.2 tag [Bug Report] Dockerfile fails to build from master and v0.26.2 tag on Windows Jul 9, 2022
@tylercamp
Copy link
Author

@hkalexling Thank you for that note and quick response, I've instead cloned and built the repo using Ubuntu on Windows (instead of via Windows terminal) and I was able to build the image without issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants