Skip to content

The Unified and Autonomous Development Platform

fix issue #89: docker app not working on an alpine server

Robin Shen32e9f1c4d741
diff --git a/.onedev-buildspec b/.onedev-buildspec
index d8de44ede8..41060daba6 100644
--- a/.onedev-buildspec
+++ b/.onedev-buildspec
@@ -76,7 +76,7 @@
<string>zip -r k8s-resources.zip k8s-resources</string>
<string></string>
<string>cat &lt;&lt; EOF &gt; run-as-docker.sh</string>
- <string>docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v \\$(which docker):/usr/bin/docker -v \\$(pwd)/onedev:/opt/onedev -p 6610:6610 1dev/server:${buildVersion}</string>
+ <string>docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v \\$(pwd)/onedev:/opt/onedev -p 6610:6610 1dev/server:${buildVersion}</string>
<string>EOF</string>
</commands>
<retrieveSource>true</retrieveSource>
diff --git a/server-product/docker/Dockerfile b/server-product/docker/Dockerfile
index 08f7b4a5f9..ffa8d7ee7d 100644
--- a/server-product/docker/Dockerfile
+++ b/server-product/docker/Dockerfile
@@ -3,6 +3,6 @@ FROM ubuntu:18.04
COPY app /app
COPY entrypoint.sh idle.sh /root/bin/
COPY kubectl /usr/local/bin/
-RUN apt-get update && apt-get install -y iproute2 curl git openjdk-8-jre-headless
+RUN apt-get update && apt-get install -y docker.io iproute2 curl git openjdk-8-jre-headless
EXPOSE 6610
CMD ["/root/bin/entrypoint.sh"]