Newer
Older
DummyAnd / docker-compose.yml
@Benoit Donneaux Benoit Donneaux on 17 Dec 2019 937 bytes [DP-590] Avoid fork and tune memory limit
version: '3'
services:
  default:
    build: 
      context: lazyDir
      dockerfile: centos7.Dockerfile
      args:
        uid: "${_UID:-1000}"
        gid: "${_GID:-1000}"
    volumes:
      - .:/home/android/workspace
      - ~/android/sdk:/opt/android/sdk
      - ~/.gradle:/home/android/.gradle
    working_dir: /home/android/workspace
    stdin_open: true
    tty: true
    hostname: build-android.local
    container_name: build-android.local
    command: bash
    networks:
      - bridge
    deploy:
      resources:
        limits:
          cpus: '1.5'
          memory: 2560M
    environment:
      - JAVA_HOME=/usr/java/latest
      - ANDROID_HOME=/opt/android/sdk
      - GRADLE_OPTS=-XX:MaxMetaspaceSize=256m -Xmx1792m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -Dme.jenkins -Dorg.gradle.daemon=false -Dkotlin.compiler.execution.strategy=in-process

networks:
  bridge:
    external: true