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

Add dockerfile to start server in a docker container #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:10.11-alpine

WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install

COPY . .

EXPOSE 8080

CMD [ "node", "server.js" ]
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ export CORSANYWHERE_RATELIMIT='50 3 my.example.com my2.example.com'
node server.js
```

#### Dockerfile

You also can use the Dockerfile to build your own docker image and start CORS Anywhere server in a container:
```
docker build -t cors-anywhere .
docker run -d -p 8080:8080 --name cors-anywhere -e CORSANYWHERE_WHITELIST=https://example.com,http://example.com,http://example.com:8080 cors-anywhere
```

## License

Expand Down