FROM alpine:3.8

ENV APP_NAME course-assign
ENV APP_PATH /user/local/projects/course-assign

WORKDIR $APP_PATH

RUN echo "https://mirrors.aliyun.com/alpine/v3.8/main/" > /etc/apk/repositories && \
    echo "https://mirrors.aliyun.com/alpine/v3.8/community/" >> /etc/apk/repositories && \
    apk update && \
    apk add tzdata && \
    apk add bash && \
    apk add supervisor && \
    /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo 'Asia/Shanghai' >/etc/timezone && \
    mkdir -p ${APP_PATH}

COPY . $APP_PATH
ENTRYPOINT ["bash", "./run.sh"]
