12345678910111213141516171819202122 |
- FROM alpine
- RUN echo -e https://mirrors.ustc.edu.cn/alpine/v3.15/main > /etc/apk/repositories \
- && cat /etc/apk/repositories \
- # 设置时区为上海
- && apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
- && echo "Asia/Shanghai" > /etc/timezone \
- && apk del tzdata \
- # 解决apline 运行编译后的执行文件 not found错误
- # 由于alpine镜像使用的是musl libc而不是gnu libc,/lib64/ 是不存在的。但他们是兼容的,可以创建个软连接
- && mkdir /lib64 \
- && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 \
- && mkdir -p /root/oilseal-exam
- WORKDIR /root/oilseal-exam
- ADD ./file ./file
- ADD ./oilseal-exam ./
- ADD ./config-linux.yaml ./
- EXPOSE 3001
- ENTRYPOINT ["./oilseal-exam"]
|