Skip to content

Commit 6e1c8cc

Browse files
committed
Share the Docker image used for building AppImages
1 parent 6ec4156 commit 6e1c8cc

6 files changed

Lines changed: 33 additions & 43 deletions

File tree

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ matrix:
1515
- env: ARCH=x86_64
1616

1717
install:
18-
- docker build -t python-${ARCH} --build-arg Arch=${ARCH} .travis
18+
- docker build -t ${DOCKER_USERNAME}/linuxdeploy-plugin-python:${ARCH} --build-arg Arch=${ARCH} .travis
1919

2020
script:
21-
- docker run --cap-add SYS_ADMIN --device /dev/fuse --mount src=$PWD,dst=/work,type=bind python-${ARCH}
21+
- docker run --cap-add SYS_ADMIN --device /dev/fuse --mount src=$PWD,dst=/work,type=bind ${DOCKER_USERNAME}/linuxdeploy-plugin-python:${ARCH}
2222

2323
after_success:
2424
- ./.travis/after-success.sh

.travis/Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ FROM ubuntu:trusty
22
LABEL maintainer="https://github.com/niess"
33

44
ARG Arch=x86_64
5-
ENV ARCH="${Arch}" OPENSSL="1.1.1c"
5+
ENV ARCH="${Arch}" \
6+
OPENSSL="1.1.1c" \
7+
OPENSSL_DIR="${HOME}/openssl/${OPENSSL}${CONFIG_HASH}"
68

79
RUN apt update -y -qq && \
810
apt install --no-install-recommends -y -qq \
@@ -13,6 +15,13 @@ RUN apt update -y -qq && \
1315

1416
COPY . /work/.travis
1517
WORKDIR /work
18+
SHELL ["/bin/bash", "-c"]
1619

1720
RUN ./.travis/install.sh
18-
CMD ./.travis/script.sh
21+
22+
ENV PATH="${OPENSSL_DIR}/bin:${PATH}" \
23+
CFLAGS="${CFLAGS} -I${OPENSSL_DIR}/include" \
24+
LDFLAGS="-L${OPENSSL_DIR}/lib -Wl,-rpath=${OPENSSL_DIR}/lib" \
25+
LD_LIBRARY_PATH="${OPENSSL_DIR}/lib:${LD_LIBRARY_PATH}"
26+
27+
CMD ["./.travis/script.sh"]

.travis/after-success.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#! /bin/bash
22

3+
# Upload the AppImage
34
ls -lh appimage/*.AppImage
45
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
56
source upload.sh appimage/*.AppImage
7+
8+
9+
# Upload the Docker container
10+
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
11+
docker push $DOCKER_USERNAME/linuxdeploy-plugin-python:${ARCH}

.travis/install.sh

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,18 @@
22

33
set -ex
44

5-
# Download, compile, and install if it's not already present in cache
6-
if [ -n "${OPENSSL}" ]; then
7-
source .travis/openssl-config.sh
8-
9-
wget --no-check-certificate -q "https://www.openssl.org/source/openssl-${OPENSSL}.tar.gz"
10-
tar zxf "openssl-${OPENSSL}.tar.gz"
11-
pushd "openssl-${OPENSSL}"
12-
./config $OPENSSL_CONFIG_FLAGS -fPIC --prefix="$OPENSSL_DIR"
13-
make depend
14-
make -j"$(nproc)"
15-
if [[ "${OPENSSL}" =~ 1.0.1 ]]; then
16-
# OpenSSL 1.0.1 doesn't support installing without the docs.
17-
make install
18-
else
19-
# Avoid installing the docs
20-
make install_sw install_ssldirs
21-
fi
22-
popd
5+
# Download, compile, and install openssl
6+
wget --no-check-certificate -q "https://www.openssl.org/source/openssl-${OPENSSL}.tar.gz"
7+
tar zxf "openssl-${OPENSSL}.tar.gz"
8+
pushd "openssl-${OPENSSL}"
9+
./config no-ssl2 no-ssl3 shared -fPIC --prefix="$OPENSSL_DIR"
10+
make depend
11+
make -j"$(nproc)"
12+
if [[ "${OPENSSL}" =~ 1.0.1 ]]; then
13+
# OpenSSL 1.0.1 doesn't support installing without the docs.
14+
make install
15+
else
16+
# Avoid installing the docs
17+
make install_sw install_ssldirs
2318
fi
19+
popd

.travis/openssl-config.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

.travis/script.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22

33
set -ex
44

5-
6-
if [ -n "${OPENSSL}" ]; then
7-
source .travis/openssl-config.sh
8-
export PATH="${OPENSSL_DIR}/bin:${PATH}"
9-
export CFLAGS="${CFLAGS} -I${OPENSSL_DIR}/include"
10-
export LDFLAGS="-L${OPENSSL_DIR}/lib -Wl,-rpath=${OPENSSL_DIR}/lib"
11-
export LD_LIBRARY_PATH="${OPENSSL_DIR}/lib:${LD_LIBRARY_PATH}"
12-
fi
13-
14-
155
./appimage/build-plugin.sh
166
./appimage/build-python.sh python2
177
./appimage/build-python.sh python3

0 commit comments

Comments
 (0)