Skip to content

Commit f94807c

Browse files
committed
[docker] Initial packaging container
1 parent 3a37d19 commit f94807c

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

packaging/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM ev3dev/ev3dev-stretch-ev3-base
2+
3+
# copy QEMU
4+
COPY qemu-arm-static /usr/bin/qemu-arm-static
5+
6+
# install packaging utilities
7+
RUN ["/usr/bin/qemu-arm-static", "/bin/bash", "-c", \
8+
"apt-get -q update && DEBIAN_FRONTEND=noninteractive apt-get -q install --yes --no-install-recommends devscripts debhelper fakeroot zip unzip gnupg dctrl-tools dput"]
9+
10+
# prepare a nonroot user
11+
COPY compiler.sudoers /etc/sudoers.d/compiler
12+
RUN ["/usr/bin/qemu-arm-static", "/bin/bash", "-c", \
13+
"chmod 0440 /etc/sudoers.d/compiler && adduser --disabled-password --gecos \"\" compiler && usermod -a -G sudo compiler"]
14+
15+
# copy build patches & scripts
16+
COPY *.awk *.patch *.sh /opt/jdkpkg/
17+
COPY debian/ /opt/jdkpkg/debian/
18+
RUN ["/usr/bin/qemu-arm-static", "/bin/bash", "-c", "chmod +x /opt/jdkpkg/*.sh"]
19+
20+
# this directory should be mounted
21+
VOLUME /build
22+
23+
USER compiler
24+
WORKDIR /opt/jdkpkg
25+
CMD ["/usr/bin/qemu-arm-static", "/bin/bash", "/opt/jdkpkg/package.sh"]

packaging/compiler.sudoers

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
compiler ALL=(ALL) NOPASSWD:ALL

packaging/qemu-arm-static

5.27 MB
Binary file not shown.

0 commit comments

Comments
 (0)