Dockerfile-prod 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. ###########
  2. # BUILDER #
  3. ###########
  4. # pull official base image
  5. FROM python:3.10.7-slim-buster as builder
  6. # set work directory
  7. WORKDIR /usr/src/app
  8. # set environment variables
  9. ENV PYTHONDONTWRITEBYTECODE 1
  10. ENV PYTHONUNBUFFERED 1
  11. # install system dependencies
  12. RUN apt-get update && \
  13. apt-get install -y --no-install-recommends gcc
  14. # lint
  15. RUN pip install --upgrade pip
  16. COPY . /usr/src/app/
  17. # install python dependencies
  18. COPY ./requirements.txt .
  19. RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels -r requirements.txt
  20. #########
  21. # FINAL #
  22. #########
  23. # pull official base image
  24. FROM python:3.10.7-slim-buster
  25. # create directory for the app user
  26. RUN mkdir -p /home/app
  27. # create the app user
  28. RUN addgroup --system app && adduser --system --group app
  29. # create the appropriate directories
  30. ENV HOME=/home/app
  31. ENV APP_HOME=/home/app/web
  32. RUN mkdir $APP_HOME
  33. WORKDIR $APP_HOME
  34. # install dependencies
  35. RUN apt-get update && apt-get install -y --no-install-recommends netcat
  36. COPY --from=builder /usr/src/app/wheels /wheels
  37. COPY --from=builder /usr/src/app/requirements.txt .
  38. RUN pip install --upgrade pip
  39. RUN pip install --no-cache /wheels/*
  40. # copy entrypoint-prod.sh
  41. COPY ./entrypoint.sh $APP_HOME
  42. # copy project
  43. COPY . $APP_HOME
  44. # chown all the files to the app user
  45. RUN chown -R app:app $APP_HOME
  46. # change to the app user
  47. USER app
  48. #RUN chmod u+x ./entrypoint.sh
  49. ENTRYPOINT ["/home/app/web/entrypoint.sh"]
PANIC: session(release): write data/sessions/0/3/03d96cfaea76b299: no space left on device

PANIC

session(release): write data/sessions/0/3/03d96cfaea76b299: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x874858)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x7fe23b)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x7d54d4)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x7d53fc)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x7fe392)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x804106)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x8040fd)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x8016a4)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x7d54d4)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x7d53fc)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x7fe392)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x809f84)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x80b0ec)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x803224)
net/http/server.go:2916 (0x77e1da)
net/http/server.go:1966 (0x779696)
runtime/asm_amd64.s:1571 (0x471060)