Skip to content

Commit

Permalink
docker: Install transifex-client in a virtualenv
Browse files Browse the repository at this point in the history
The Fedora package is currently broken due to:
https://bugzilla.redhat.com/show_bug.cgi?id=1653103

Signed-off-by: Andrew Gunnerson <[email protected]>
  • Loading branch information
chenxiaolong committed Nov 25, 2018
1 parent 14458e2 commit 8dea723
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docker/common.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
repo=chenxiaolong/dualbootpatcher
version=9.3.0
release=8
release=9
15 changes: 13 additions & 2 deletions docker/template/Dockerfile.base.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,25 @@ RUN parent=$(dirname ${ANDROID_NDK_HOME}) \
ENV PATH ${PATH}:${ANDROID_NDK_HOME}

# Install dependencies
# procps-ng is needed due to https://issues.jenkins-ci.org/browse/JENKINS-40101
# * procps-ng is needed due to:
# https://issues.jenkins-ci.org/browse/JENKINS-40101
# * A virtualenv is used for transifex instead of the transifex-client package
# because of: https://bugzilla.redhat.com/show_bug.cgi?id=1653103
RUN dnf -y install \
ccache cmake findutils gcc-c++ git make procps-ng unzip zip \
ncurses-compat-libs \
java-1.8.0-openjdk-headless transifex-client \
java-1.8.0-openjdk-headless \
openssl-devel yaml-cpp-devel \
&& dnf clean all

# Transifex virtualenv
RUN dnf -y install python3-virtualenv \
&& virtualenv /usr/local/venv-transifex \
&& /usr/local/venv-transifex/bin/pip install transifex-client \
&& ln -s /usr/local/venv-transifex/bin/tx /usr/local/bin/ \
&& dnf remove -y python3-virtualenv \
&& dnf clean all

# Volumes
ENV BUILDER_HOME /builder
WORKDIR ${BUILDER_HOME}
Expand Down
10 changes: 5 additions & 5 deletions docs/build/Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ Note that building the docker images will take a long time and consume a lot of
Once the images have been built, the resulting image tags are written to `docker/generated/images.properties`. It will look something like the following:

```dosini
android=chenxiaolong/dualbootpatcher:9.3.0-8-android
base=chenxiaolong/dualbootpatcher:9.3.0-8-base
linux=chenxiaolong/dualbootpatcher:9.3.0-8-linux
mingw=chenxiaolong/dualbootpatcher:9.3.0-8-mingw
android=chenxiaolong/dualbootpatcher:9.3.0-9-android
base=chenxiaolong/dualbootpatcher:9.3.0-9-base
linux=chenxiaolong/dualbootpatcher:9.3.0-9-linux
mingw=chenxiaolong/dualbootpatcher:9.3.0-9-mingw
```

The following table describes the images that are built:
Expand All @@ -54,7 +54,7 @@ docker run --rm -it \
-v "${HOME}/.android:/builder/.android:rw,z" \
-v "${HOME}/.ccache:/builder/.ccache:rw,z" \
-v "${HOME}/.gradle:/builder/.gradle:rw,z" \
chenxiaolong/dualbootpatcher:9.3.0-8-android \
chenxiaolong/dualbootpatcher:9.3.0-9-android \
bash
```

Expand Down

0 comments on commit 8dea723

Please sign in to comment.