Remove obsolete `docker-build` folder

Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
Pedro Pombeiro 2019-01-11 17:20:20 +01:00
parent a458dfe1da
commit 941526a7fc
No known key found for this signature in database
GPG Key ID: A65DEB11E4BBC647
4 changed files with 0 additions and 170 deletions

View File

@ -94,21 +94,6 @@ prepare-android: $(STATUS_GO_DRO_ARCH) ##@prepare Install and prepare Android-sp
prepare-mobile: prepare-android prepare-ios ##@prepare Install and prepare mobile platform specific dependencies
#----------------
# Docker image
#----------------
docker-build-image: ##@docker build Docker image for debugging environment
docker-compose -f docker-build/docker-compose.yml build \
--build-arg="ANDROID_NDK_VERSION=$(call __read__toolversion__,ANDROID_NDK_VERSION)" \
--build-arg="LEIN_VERSION=$(call __read__toolversion__,lein)" \
--build-arg="NODE_VERSION=$(call __read__toolversion__,node)" \
--build-arg="YARN_VERSION=$(call __read__toolversion__,yarn)" \
--build-arg="REACT_NATIVE_CLI_VERSION=$(call __read__toolversion__,react_native_cli)" \
adbd
docker-run: docker-build ##@docker run Docker container for debugging environment
docker-compose -f docker-build/docker-compose.yml up
#----------------
# Release builds
#----------------

View File

@ -1,102 +0,0 @@
FROM openjdk:8-jdk
ENV DEBIAN_FRONTEND noninteractive
ENV ANDROID_HOME /opt/android-sdk-linux
ENV ANDROID_SDK_HOME /opt/android-sdk-linux
ENV PATH ${PATH}:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:${PATH}:${ANDROID_HOME}/tools
ENV ANDROID_NDK /opt/android-ndk-linux
ENV ANDROID_NDK_HOME /opt/android-ndk-linux
WORKDIR /opt
RUN mkdir -p /opt/android-sdk-linux && mkdir -p ~/.android && touch ~/.android/repositories.cfg
# Install dependencies
RUN apt-get update && \
apt-get install -yq supervisor curl unzip wget sudo maven libc6 libstdc++6 zlib1g libncurses5 make file --no-install-recommends && \
apt-get clean
RUN cd /opt/android-sdk-linux && \
wget -q --output-document=sdk-tools.zip https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip && \
unzip sdk-tools.zip && \
rm -f sdk-tools.zip && \
sdkmanager "cmake;3.6.4111459"
RUN cd /opt/android-sdk-linux && \
wget -q --output-document=sdk-platform-tools.zip 'https://dl.google.com/android/repository/platform-tools-latest-linux.zip' && \
unzip sdk-platform-tools.zip && \
rm -f sdk-platform-tools.zip
ARG ANDROID_NDK_VERSION
RUN wget -q --output-document=android-ndk.zip "http://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip" && \
unzip android-ndk.zip && \
rm -f android-ndk.zip && \
mv android-ndk-${ANDROID_NDK_VERSION} android-ndk-linux
RUN yes | sdkmanager --licenses
# install Node JS (https://github.com/nodejs/docker-node/blob/90d5e3df903b830d039d3fe8f30e3a62395db37e/7.5/Dockerfile)
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NPM_CONFIG_LOGLEVEL info
# that's the only version that doesn't hang on installing react-native-http inside docker
ARG NODE_VERSION=10.14.0
ENV NODE_ENV development
RUN curl -SLO "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" \
&& tar -xJf "node-v${NODE_VERSION}-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
&& rm "node-v${NODE_VERSION}-linux-x64.tar.xz" \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
# END install Node JS
# Support Gradle
ENV TERM dumb
# Install Lein
# Check out latest releases from https://github.com/technomancy/leiningen/releases
ARG LEIN_VERSION
ENV LEIN_INSTALL=/usr/local/bin/
RUN mkdir -p $LEIN_INSTALL \
&& wget -q https://raw.githubusercontent.com/technomancy/leiningen/${LEIN_VERSION}/bin/lein-pkg \
&& mv lein-pkg $LEIN_INSTALL/lein \
&& chmod 0755 $LEIN_INSTALL/lein \
&& wget -q https://github.com/technomancy/leiningen/releases/download/${LEIN_VERSION}/leiningen-${LEIN_VERSION}-standalone.zip \
&& mkdir -p /usr/share/java \
&& mv leiningen-${LEIN_VERSION}-standalone.zip /usr/share/java/leiningen-${LEIN_VERSION}-standalone.jar
# Install React-Native
ARG REACT_NATIVE_CLI_VERSION
RUN npm install -g react-native-cli@${REACT_NATIVE_CLI_VERSION}
# Install Yarn
ARG YARN_VERSION
RUN npm install -g yarn@${YARN_VERSION}
# Add files needed for installing dependencies
# Use directory /build for that purpose
WORKDIR /build
ADD .env.jenkins .env
ADD . ./
RUN export ANDROID_SDK_ROOT=/opt/android-sdk-linux && \
rm ./android/local.properties && make setup && make prepare-android
COPY supervisord.conf /etc/supervisord.conf
RUN keytool -genkey -v -keystore status-im.keystore -storepass password -alias status -keyalg RSA -keysize 2048 -validity 10000 -dname "CN=mqttserver.ibm.com, OU=ID, O=IBM, L=Hursley, S=Hants, C=GB" -keypass password && \
mkdir -p /root/.gradle && \
mv status-im.keystore /root/.gradle/
RUN echo "sdk.dir=/opt/android-sdk-linux" >> android/local.properties && \
echo "ndk.dir=/opt/android-ndk-linux" >> android/local.properties
RUN cd ./android && ./gradlew react-native-android:installArchives && \
./gradlew assembleRelease
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]

View File

@ -1,37 +0,0 @@
# Build
``` shell
make docker-build
```
This will install all the required sdks, depending on the connection will take some time.
# Run
``` shell
make docker-run
```
This will start `adbd` and `fighwheel` listening on port `4567`.
You need to connect your device and accept the key.
After the figwheel prompt you can install the application running:
``` shell
docker-compose -f docker-build/docker-compose.yml exec adbd make run-android
```
# Notes
## Adbd key
The adbd key is generated every time you start/stop the container, so you will have to accept it if that happens.
## Security
This will give the docker image access to your USB devices and run in priviliged mode, so run at your own risk.
## Multiple adbd
You will need to make sure no `adbd` is running on your local machine, as that would interfer with the one running in docker.

View File

@ -1,16 +0,0 @@
version: '3'
services:
adbd:
privileged: true
build:
context: $PWD
dockerfile: docker-build/Dockerfile
ports:
- 4567:4567
volumes:
- /dev/bus/usb:/dev/bus/usb
- ../src:/build/src
- ../test:/build/test
- ../scripts:/build/scripts
- ../android/app/src/:/build/android/app/src