瀏覽代碼

fix: docker

double.huang 4 年之前
父節點
當前提交
f49f27f4ef
共有 3 個文件被更改,包括 6 次插入2 次删除
  1. 2 2
      Dockerfile
  2. 2 0
      entrypoint.sh
  3. 2 0
      hosts

+ 2 - 2
Dockerfile

@@ -1,8 +1,8 @@
 FROM alpine
 FROM alpine
 ADD i2-bill-erp.tar.gz /app/
 ADD i2-bill-erp.tar.gz /app/
 
 
-RUN echo "echo '127.0.0.1 i2-bill-erp' > /etc/hosts" >> /app/entrypoint.sh
-RUN echo "/app/i2-bill-erp -f /app/etc/transform.yaml" >> /app/entrypoint.sh
+COPY hosts /app/
+COPY entrypoint.sh /app/
 
 
 VOLUME [ "/app/etc" ]
 VOLUME [ "/app/etc" ]
 EXPOSE 8888
 EXPOSE 8888

+ 2 - 0
entrypoint.sh

@@ -0,0 +1,2 @@
+cp hosts /etc/hosts
+/app/i2-bill-erp -f /app/etc/transform.yaml

+ 2 - 0
hosts

@@ -0,0 +1,2 @@
+127.0.0.1 localhost
+127.0.0.1 i2-bill-erp