Browse Source

Avoid running docker image as root

pull/266/head
Clemens Wolff 5 years ago
parent
commit
48c3d4832e
3 changed files with 14 additions and 3 deletions
  1. 7
      Dockerfile
  2. 2
      README.md
  3. 8
      azuredeploy.json

7
Dockerfile

@ -29,18 +29,21 @@ RUN cd /doccano \
FROM python:${PYTHON_VERSION}-slim AS runtime
RUN useradd -ms /bin/sh doccano
COPY --from=builder /deps /deps
RUN pip install --no-cache-dir /deps/*.whl
COPY --from=cleaner /doccano /doccano
COPY --from=cleaner --chown=doccano:doccano /doccano /doccano
ENV DEBUG="True"
ENV SECRET_KEY="change-me-in-production"
ENV PORT="80"
ENV PORT="8000"
ENV WORKERS="2"
ENV GOOGLE_TRACKING_ID=""
ENV AZURE_APPINSIGHTS_IKEY=""
USER doccano
WORKDIR /doccano
EXPOSE ${PORT}

2
README.md

@ -130,7 +130,7 @@ Depending on your installation method, there are two options:
First, run a Docker container:
```bash
docker run -d --name doccano -p 8000:80 chakkiworks/doccano
docker run -d --name doccano -p 8000:8000 chakkiworks/doccano
```
Then, execute `create-admin.sh` script for creating a superuser.

8
azuredeploy.json

@ -271,6 +271,14 @@
"linuxFxVersion": "[concat('DOCKER|', parameters('dockerImageName'))]",
"alwaysOn": true,
"appSettings": [
{
"name": "WEBSITES_PORT",
"value": "8000"
},
{
"name": "PORT",
"value": "8000"
},
{
"name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
"value": "false"

Loading…
Cancel
Save