2023-05-13 21:48:25 +03:00
|
|
|
FROM ubuntu:latest
|
|
|
|
|
2023-05-19 16:31:43 +03:00
|
|
|
RUN apt-get update
|
|
|
|
RUN apt-get install -y curl zip unzip
|
|
|
|
|
|
|
|
ARG JAVA_VERSION="17.0.7-zulu"
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY ./snark-main/ci ./snark-main/ci
|
|
|
|
|
|
|
|
RUN ./snark-main/ci/install_sdk.sh
|
|
|
|
RUN ./snark-main/ci/install_java.sh "$JAVA_VERSION"
|
2023-05-13 21:48:25 +03:00
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN ./requirments.sh
|
2023-05-19 16:31:43 +03:00
|
|
|
|
2023-05-22 21:57:46 +03:00
|
|
|
RUN bash -c "source ~/.sdkman/bin/sdkman-init.sh && ./gradlew clean build"
|
2023-05-19 16:31:43 +03:00
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
2023-05-19 19:27:51 +03:00
|
|
|
RUN mkdir -p ~/.aws/ && ln -s /run/secrets/credentials.json ~/.aws/credentials.json
|
|
|
|
|
2023-05-22 21:57:46 +03:00
|
|
|
CMD bash -c "source ~/.sdkman/bin/sdkman-init.sh && ./gradlew :snark-main:run_server"
|