我想手动编写dockerfile而不使用任何sbt插件.我正在使用sbt 0.13.8.我查看了dockerfile参考,但无法获得足够的洞察力来满足我的要求.演示非常有用
如果你的意思是编写一个生成能够运行sbt项目的图像的Dockerfile,你可以看看William-Yeh/docker-sbt
:
# Sbt on Java 7 # # URL: https://github.com/William-Yeh/docker-sbt # # @see http://www.scala-sbt.org/release/tutorial/Manual-Installation.html # # Version 0.7 FROM williamyeh/java7 MAINTAINER William YehENV SBT_VERSION 0.13.8 ENV SBT_JAR https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/$SBT_VERSION/sbt-launch.jar ADD $SBT_JAR /usr/local/bin/sbt-launch.jar COPY sbt.sh /usr/local/bin/sbt RUN echo "==> fetch all sbt jars from Maven repo..." && \ echo "==> [CAUTION] this may take several minutes!!!" && \ sbt VOLUME [ "/app" ] WORKDIR /app # Define default command. ENTRYPOINT ["sbt"] CMD ["--version"]