GPTfree api
commited on
Update Dockerfile
Browse files- Dockerfile +5 -28
Dockerfile
CHANGED
|
@@ -1,14 +1,8 @@
|
|
| 1 |
-
# Java 11を使用するベースイメージ
|
| 2 |
FROM openjdk:11-jdk-slim
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
git \
|
| 7 |
-
wget \
|
| 8 |
-
unzip \
|
| 9 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
-
# Android SDKをインストール
|
| 12 |
ENV ANDROID_HOME=/sdk
|
| 13 |
ENV PATH="${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${PATH}"
|
| 14 |
|
|
@@ -20,34 +14,17 @@ RUN mkdir -p $ANDROID_HOME/cmdline-tools && \
|
|
| 20 |
mkdir latest && \
|
| 21 |
mv cmdline-tools/* latest/
|
| 22 |
|
| 23 |
-
# 必要なAndroid SDKコンポーネントをインストール
|
| 24 |
RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses && \
|
| 25 |
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-33" "build-tools;33.0.2"
|
| 26 |
|
| 27 |
-
# 作業ディレクトリを設定
|
| 28 |
WORKDIR /app
|
| 29 |
-
|
| 30 |
-
# プロジェクトをクローン
|
| 31 |
RUN git clone https://github.com/martykan/webTube.git
|
| 32 |
-
|
| 33 |
-
# クローンしたディレクトリに移動
|
| 34 |
WORKDIR /app/webTube
|
| 35 |
|
| 36 |
-
#
|
| 37 |
-
RUN git clone https://github.com/guardianproject/NetCipher.git && \
|
| 38 |
-
mkdir -p app/libs && \
|
| 39 |
-
cp -r NetCipher/* app/libs/
|
| 40 |
-
|
| 41 |
-
# SDKパスを設定するためのlocal.propertiesを作成
|
| 42 |
-
RUN echo "sdk.dir=/sdk" > local.properties
|
| 43 |
-
|
| 44 |
-
# build.gradleの修正
|
| 45 |
-
RUN sed -i '/implementation.*netcipher/d' app/build.gradle
|
| 46 |
RUN sed -i '/repositories {/a \ maven { url "https://jitpack.io" }' app/build.gradle
|
|
|
|
| 47 |
|
| 48 |
-
|
| 49 |
-
RUN ./gradlew clean
|
| 50 |
-
RUN ./gradlew build --refresh-dependencies --stacktrace
|
| 51 |
|
| 52 |
-
# アプリケーションを実行するためのエントリーポイントを指定
|
| 53 |
CMD ["./gradlew", "run"]
|
|
|
|
|
|
|
| 1 |
FROM openjdk:11-jdk-slim
|
| 2 |
|
| 3 |
+
RUN apt-get update && apt-get install -y git wget unzip && \
|
| 4 |
+
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
|
|
|
| 6 |
ENV ANDROID_HOME=/sdk
|
| 7 |
ENV PATH="${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${PATH}"
|
| 8 |
|
|
|
|
| 14 |
mkdir latest && \
|
| 15 |
mv cmdline-tools/* latest/
|
| 16 |
|
|
|
|
| 17 |
RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses && \
|
| 18 |
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-33" "build-tools;33.0.2"
|
| 19 |
|
|
|
|
| 20 |
WORKDIR /app
|
|
|
|
|
|
|
| 21 |
RUN git clone https://github.com/martykan/webTube.git
|
|
|
|
|
|
|
| 22 |
WORKDIR /app/webTube
|
| 23 |
|
| 24 |
+
# JitPackリポジトリを追加する設定
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
RUN sed -i '/repositories {/a \ maven { url "https://jitpack.io" }' app/build.gradle
|
| 26 |
+
RUN echo "sdk.dir=/sdk" > local.properties
|
| 27 |
|
| 28 |
+
RUN ./gradlew clean build --refresh-dependencies --stacktrace
|
|
|
|
|
|
|
| 29 |
|
|
|
|
| 30 |
CMD ["./gradlew", "run"]
|