-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Add dockerfile to start server in a docker container #137
base: master
Are you sure you want to change the base?
Conversation
Thanks for this PR. I'm not merging it because it does not offer critical functionality, but I'll keep the PR open so that others who are looking for an example of using CORS Anywhere in a Docker container. |
I like this PR! cors-anywhere exists to be deployed, why not make it easier using a very standard tool (Docker)? I would imagine lots of people coming here end up using Docker to deploy. Just my two cents. |
Merging this PR and setting up automatic builds would help a lot! Having an official cors-anywhere image, I would set up and run an instance e.g. in AWS ECS in a few clicks of the mouse. @Rob--W please, consider merging this! Thanks for your work! |
Hi, this would be an useful addition because it makes cors-anywhere executable from any non-node server with a single |
hello, dockerfile offers critical functionality for those who need to actually deploy it. docker is today's standard way to deploy stuff. |
I run the cors-anywhere container using your dockerfile,When i run the docker image this is the output i am getting in the browser
Is this means,cors-anywhere running successfully in my local ?, If yes please let me know how to test. Thanks in advance :) |
@FuriKuri Yes seeing that page means that CORS Anywhere is running. To test it, follow the instructions as shown in that text that you're seeing. |
Hi, could you help me on this? I deployed cors-anywhere to Azure App Service. When I call this https://corsproxy-execute.azurewebsites.net/https://www.google.com.sg/, for example, instead of going to google, it shows the default texts as below. Am I doing something wrong? Kindly advise. This API enables cross-origin requests to anywhere. Usage: / Shows help If the protocol is omitted, it defaults to http (https if port 443 is specified). Cookies are disabled and stripped from requests. Redirects are automatically followed. For debugging purposes, each followed redirect results The requested URL is available in the X-Request-URL response header. To prevent the use of the proxy for casual browsing, the API requires either the Origin Demo : https://robwu.nl/cors-anywhere.html |
I switched long ago from heroku, to fly.io, fly.io DOES allow building from heroku build files, but the Fly Docker image, with Heroku specific stuff, has 400 MBs more userland junk (more heroku specific NPM default node packages, more handy .so files CORS-A and node will never use, and other framework runtimes, IDK, python, php, and friends), in the image (700 MB vs 250 MB), than Node on Docker on Fly. Also the Fly+Heroku public API emulation layer, where fly adds shell scripts and binaries that emulate heroku env vars, in your VM, before launching node, those heroku emulation/heartbeat shell scripts and binaries are added ABOVE your CORS-A node_packages docker layer, causing docker image bloat. I don't remember if Fly+Heroku emulation VM has 1-2 extra no-CPU used processes hanging around, but be a good citizen, and dont use Heroku emulator on Fly. Build times on a github actions push are much faster, if you strip "Heroku Ubuntu" and switch to "node-slim Ubuntu" .github\workflows\fly.yml
Dockerfile
.dockerignore
fly.toml
|
I've added a simple dockerfile so it is easier to start your own server.