This commit is contained in:
25
Dockerfile
25
Dockerfile
@@ -1,21 +1,26 @@
|
||||
FROM sbtscala/scala-sbt:eclipse-temurin-21.0.5_11_1.10.6_3.5.2
|
||||
FROM sbtscala/scala-sbt:eclipse-temurin-jammy-22_36_1.10.0_3.4.2
|
||||
|
||||
WORKDIR /knockout
|
||||
|
||||
COPY build.sbt /knockout/
|
||||
COPY project /knockout/project/
|
||||
RUN apt-get update && apt-get install -y curl gnupg2 x11-apps
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libxext6 \
|
||||
libxrender1 \
|
||||
libxtst6 \
|
||||
libxi6 \
|
||||
libxrandr2 \
|
||||
libgtk-3-0
|
||||
|
||||
RUN curl -sL https://dlcdn.apache.org/sbt/debian/sbt-1.9.4.deb -o sbt.deb
|
||||
|
||||
RUN dpkg -i sbt.deb || apt-get install -f -y
|
||||
|
||||
RUN sbt update
|
||||
|
||||
ENV SBT_OPTS="-Xms512M -Xmx1536M -Xss2M -XX:MaxMetaspaceSize=512M"
|
||||
|
||||
COPY . /knockout
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y libgtk-3-0 libglib2.0-0 libxext6 libxrender1 libxtst6 libx11-6 xvfb libswt-gtk-3-java gkt3
|
||||
|
||||
|
||||
|
||||
ENV DISPLAY=host.docker.internal:0.0
|
||||
|
||||
RUN sbt compile
|
||||
|
||||
CMD sbt run
|
||||
|
||||
29
Dockerfile.a
Normal file
29
Dockerfile.a
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM amazoncorretto:21.0.5-al2023-headless
|
||||
|
||||
ENV SCALA_VERSION 3.5.2
|
||||
ENV SBT_VERSION 1.5.5
|
||||
|
||||
WORKDIR /knockout
|
||||
|
||||
COPY build.sbt /knockout/
|
||||
COPY project /knockout/project/
|
||||
|
||||
RUN sbt update
|
||||
|
||||
COPY . /knockout
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y libgtk-3-0 libglib2.0-0 libxext6 libxrender1 libxtst6 libx11-6 xvfb libxi6
|
||||
|
||||
RUN sbt compile
|
||||
|
||||
CMD sbt run
|
||||
|
||||
ip=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
|
||||
xhost + $ip
|
||||
|
||||
|
||||
docker run -it --rm \
|
||||
-e DISPLAY=host.docker.internal:0 \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||
knockout:v1
|
||||
Reference in New Issue
Block a user