2021-04-21 05:41:48 +00:00
|
|
|
FROM debian:buster-slim
|
|
|
|
ARG APP=/usr/src/app
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y ca-certificates tzdata \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
EXPOSE 8000
|
|
|
|
|
|
|
|
ENV TZ=Etc/UTC \
|
|
|
|
APP_USER=appuser
|
|
|
|
|
|
|
|
RUN groupadd $APP_USER \
|
|
|
|
&& useradd -g $APP_USER $APP_USER \
|
|
|
|
&& mkdir -p ${APP}
|
|
|
|
|
|
|
|
COPY ./.env ${APP}/.env
|
|
|
|
COPY ./migrations ${APP}/migrations
|
|
|
|
COPY ./static ${APP}/static
|
2021-04-27 11:22:27 +00:00
|
|
|
COPY ./db/empty.db ${APP}/data/app.db
|
2021-04-24 17:16:11 +00:00
|
|
|
COPY ./target/release/actix-demo ${APP}/actix-demo
|
2021-04-21 05:41:48 +00:00
|
|
|
|
|
|
|
RUN chown -R $APP_USER:$APP_USER ${APP}
|
|
|
|
|
|
|
|
USER $APP_USER
|
|
|
|
WORKDIR ${APP}
|
|
|
|
CMD ["./actix-demo"]
|