Comments (12)
Build on DockerHub updated.
Also, here is the new bacon.env file. Check if it has the right values.
Thank you for your help! Sorry about the delay
from docker-lineageos.
Hello,
This image started as my own use, so having this feedback is excellent! Thank you in advance :)
Could you show me the steps you took to start building the image?
Thank you!
from docker-lineageos.
Hey,
thanks for your reply!
EDIT:
For sake of completeness: I pulled
docker pull jfloff/lineageos
I called it with the following parameters:
docker run --rm --privileged -v $(pwd)/android:/home/lineageos --env-file dockerbuild/bacon.env -ti jfloff/lineageos
the bacon.env
contains the following:
#!/bin/bash
GIT_USER_NAME=GRBurst
GIT_USER_EMAIL=[masked]
BASE_DIR=/home/lineageos
LINEAGEOS_REPO=https://github.com/LineageOS/android.git
LINEAGEOS_BRANCH=cm-14.1
USE_CCACHE=1
CCACHE_SIZE=75G
CCACHE_COMPRESS=1
CCACHE_DIR=/home/lineageos/ccache
ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx8G"
WITH_SU=false
DEVICE_CODENAME=bacon
PROPRIETARY_BLOBS_REPO=https://github.com/TheMuppets/proprietary_vendor_oneplus
PROPRIETARY_BLOBS_DIR=/home/lineageos/vendor/oneplus
I masked the E-Mail above, but I set a correct one in bacon.env
.
As you can see I hardcoded the paths for e.g. CCACHE. That is not really an issue but I would prefere to write it like that:
#!/bin/bash
GIT_USER_NAME=GRBurst
GIT_USER_EMAIL=[masked]
BASE_DIR="/home/$USER"
LINEAGEOS_REPO=https://github.com/LineageOS/android.git
LINEAGEOS_BRANCH=cm-14.1
USE_CCACHE=1
CCACHE_SIZE=75G
CCACHE_COMPRESS=1
CCACHE_DIR="$BASE_DIR/ccache"
ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx8G"
WITH_SU=false
DEVICE_CODENAME=bacon
PROPRIETARY_BLOBS_REPO=https://github.com/TheMuppets/proprietary_vendor_oneplus
PROPRIETARY_BLOBS_DIR="$BASE_DIR/vendor/oneplus"
from docker-lineageos.
Just so you know, I'm looking at it! Just holidays are in the way :)
Happy new year!
from docker-lineageos.
Hey thanks and a happy new year to you, too :-)
I just played a bit and read your code. The problem concerning the environment variables seems to be caused by just sourcing them, but instead, you must force them to get expanded.
As far as I understand this can be achieved using envsubst
in the init.sh script, see SO.
from docker-lineageos.
Sorry about being slow answering this, thing is I was struggling with my computer and didn't had enough space to build android. I think its all good now.
Question, could you paste the output of printenv
once you are inside the container? Let's focus on the 2nd version of your .env file, the one you think should work.
Run the container only with printenv
:
docker run --rm --privileged -v $(pwd)/android:/home/lineageos --env-file dockerbuild/bacon.env -ti jfloff/lineageos printenv
Paste the output so I can check :)
Thank you so much! Let's fix this 💪
from docker-lineageos.
I found out that this is a problem from the Docker env-file
parameter. It doesn't interpret variables in a bash-like way (moby/moby#26009).
This is clearly visible when I backup the current environment (https://github.com/jfloff/docker-lineageos/blob/master/init.sh#L8), it comes with all the quotes and dollar escaped:
declare -x BASE_DIR="\"/home/\$USER\""
declare -x CCACHE_DIR="\"\$BASE_DIR/ccache\""
declare -x PROPRIETARY_BLOBS_DIR="\"\$BASE_DIR/vendor/oneplus\""
According to their PR (moby/moby#28092 (comment)) implementing this would be like implementing another shell. However, we need some solution for this. I think the best way would be to do some sed
ing on the result of declare -xp
, we unescape the first and last quotes and the dollar signs.
I'm thinking of replacing https://github.com/jfloff/docker-lineageos/blob/master/init.sh#L8 with something along these lines:
declare -px | sed -e 's/"\\"/"/g; s/\\""/"/g; s/\\\$/\$/g' > /tmp/current.env
What do you think? Its not perfect, but that's what could be done with Docker's limitation.
from docker-lineageos.
Okay that one is ugly but if it works 😀
from docker-lineageos.
Yes, it is indeed ... You do whatcha gotta do :)
from docker-lineageos.
Ok, I also was able to init
and build
with your bacon details. I'm even adding them to the repository, feel free to edit them afterwards.
I guess this closes the issue. Commit incoming and new builds for Docker Hub also on the way.
from docker-lineageos.
@GRBurst could you confirm me that everything is working?
from docker-lineageos.
@jfloff yes, I will try it on the weekend :-)
from docker-lineageos.
Related Issues (8)
- Unable to build on OSX HOT 2
- repo version should be updated HOT 15
- error: could not lock config file /home/lineageos/.gitconfig: Permission denied
- Clarity: Obtaining "Blobs" for Older Verisons?
- Mako (Nexus 4) building errors HOT 9
- local manifest HOT 5
- H990 - segmentation fault while building kernel HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-lineageos.