File size: 785 Bytes
a59941e 8677d0c a59941e 1ea0527 a59941e 1ea0527 a59941e 1ea0527 276b1a5 28a70a7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# ... 前面的内容保持不变 ...
# 将 release 目录下的文件转移到 WORKDIR,并添加调试信息
RUN if [ -d "/app/linux-amd64/release" ]; then \
echo "Moving files from /app/linux-amd64/release to /app"; \
mv /app/linux-amd64/release/* /app/ ; \
echo "Files moved successfully"; \
else \
echo "/app/linux-amd64/release directory does not exist"; \
fi
# 检查 apimain 文件是否存在,并添加调试信息
RUN if [ -f "/app/apimain" ]; then \
echo "apimain file exists"; \
chmod +x /app/apimain; \
echo "apimain file permission set to executable"; \
else \
echo "apimain file does not exist"; \
fi
# 运行可执行文件(假设可执行文件名为 apimain)
CMD ["./apimain"]
|