You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
564 B

  1. FROM debian:buster-slim
  2. ARG APP=/usr/src/app
  3. RUN apt-get update \
  4. && apt-get install -y ca-certificates tzdata \
  5. && rm -rf /var/lib/apt/lists/*
  6. EXPOSE 8000
  7. ENV TZ=Etc/UTC \
  8. APP_USER=appuser
  9. RUN groupadd $APP_USER \
  10. && useradd -g $APP_USER $APP_USER \
  11. && mkdir -p ${APP}
  12. COPY ./.env ${APP}/.env
  13. COPY ./migrations ${APP}/migrations
  14. COPY ./static ${APP}/static
  15. COPY ./db/empty.db ${APP}/data/app.db
  16. COPY ./target/release/actix-demo ${APP}/actix-demo
  17. RUN chown -R $APP_USER:$APP_USER ${APP}
  18. USER $APP_USER
  19. WORKDIR ${APP}
  20. CMD ["./actix-demo"]