This repository has been archived by the owner on Jun 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.build
89 lines (74 loc) · 3.35 KB
/
Dockerfile.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
FROM bossjones/boss-docker-jhbuild-pygobject3:2.1.0
MAINTAINER Malcolm Jones <[email protected]>
# build-arg are acceptable
# eg. docker build --build-arg var=xxx
ARG SCARLETT_ENABLE_SSHD
ARG SCARLETT_ENABLE_DBUS
ARG SCARLETT_BUILD_GNOME
ARG TRAVIS_CI
ARG STOP_AFTER_GOSS_JHBUILD
ARG STOP_AFTER_GOSS_GTK_DEPS
ARG STOP_AFTER_TRAVIS_CI_PYTEST
ARG SKIP_GOSS_TESTS_JHBUILD
ARG SKIP_GOSS_TESTS_GTK_DEPS
ARG SKIP_TRAVIS_CI_PYTEST
# metadata
ARG CONTAINER_VERSION
ARG GIT_BRANCH
ARG GIT_SHA
ARG BUILD_DATE
ENV SCARLETT_ENABLE_SSHD ${SCARLETT_ENABLE_SSHD:-0}
ENV SCARLETT_ENABLE_DBUS ${SCARLETT_ENABLE_DBUS:-'true'}
ENV SCARLETT_BUILD_GNOME ${SCARLETT_BUILD_GNOME:-'false'}
ENV TRAVIS_CI ${TRAVIS_CI:-'true'}
ENV STOP_AFTER_GOSS_JHBUILD ${STOP_AFTER_GOSS_JHBUILD:-'false'}
ENV STOP_AFTER_GOSS_GTK_DEPS ${STOP_AFTER_GOSS_GTK_DEPS:-'false'}
ENV SKIP_GOSS_TESTS_JHBUILD ${SKIP_GOSS_TESTS_JHBUILD:-'false'}
ENV SKIP_GOSS_TESTS_GTK_DEPS ${SKIP_GOSS_TESTS_GTK_DEPS:-'false'}
ENV STOP_AFTER_TRAVIS_CI_PYTEST ${STOP_AFTER_TRAVIS_CI_PYTEST:-'false'}
ENV SKIP_TRAVIS_CI_PYTEST ${SKIP_TRAVIS_CI_PYTEST:-'false'}
# ENV WHEELHOUSE=/wheelhouse
# ENV PIP_WHEEL_DIR=/wheelhouse
# ENV PIP_FIND_LINKS=/wheelhouse
# VOLUME /wheelhouse
# VOLUME /application
COPY requirements.txt /home/pi/dev/bossjones-github/scarlett_os/
COPY requirements_dev.txt /home/pi/dev/bossjones-github/scarlett_os/
COPY requirements_test_all.txt /home/pi/dev/bossjones-github/scarlett_os/
RUN chown -R pi:pi /home/pi/dev/bossjones-github/scarlett_os/requirements.txt \
/home/pi/dev/bossjones-github/scarlett_os/requirements_dev.txt \
/home/pi/dev/bossjones-github/scarlett_os/requirements_test_all.txt
WORKDIR /home/pi/dev/bossjones-github/scarlett_os
# NOTE: Temp run install as pi user
USER $UNAME
RUN pip install --ignore-installed -U pip
RUN pip install --upgrade setuptools==36.0.1 wheel==0.29.0
RUN jhbuild run -- pip install -r requirements.txt
RUN jhbuild run -- pip install -r requirements_test_all.txt
RUN sudo bash /prep-pi.sh
# RUN set -x \
# && pip install --ignore-installed --pre "https://github.com/pradyunsg/pip/archive/hotfix/9.0.2.zip#egg=pip" \
# && pip install --upgrade setuptools==36.0.1 wheel==0.29.0 \
# && jhbuild run -- pip freeze \
# && jhbuild run -- pip install -r requirements.txt \
# && jhbuild run -- pip install -r requirements_test_all.txt \
# && sudo bash /prep-pi.sh
# RUN set -x cd /home/pi/dev/bossjones-github/scarlett_os \
# && pwd \
# && sudo chown pi:pi -R /wheelhouse \
# # FIXME: Shouldn't be necessary anymore after pip > 9.0.1!
# # https://github.com/pypa/setuptools/issues/885
# # https://github.com/pypa/pip/issues/4216
# # ORIG: https://github.com/pradyunsg/pip/archive/hotfix/9.0.2.zip#egg=pip
# # Locking to bossjones fork just in case this changes without use knowing, tested and it works
# && pip install --ignore-installed --pre "https://github.com/pradyunsg/pip/archive/hotfix/9.0.2.zip#egg=pip" \
# && pip install --upgrade setuptools==36.0.1 wheel==0.29.0 \
# && jhbuild run -- pip wheel -r requirements.txt \
# && jhbuild run -- pip freeze \
# && jhbuild run python3 setup.py install \
# && jhbuild run -- pip wheel -e .[test]
# NOTE: Temp run install as pi user
USER root
COPY ./container/root /
COPY ./ /home/pi/dev/bossjones-github/scarlett_os
CMD ["/bin/bash", "/run.sh"]