Skip to content

Commit 0427b67

Browse files
author
Maik Hummel
committed
Update image
1 parent 30769f8 commit 0427b67

File tree

4 files changed

+138
-10
lines changed

4 files changed

+138
-10
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ services:
44
- docker
55

66
script:
7-
- docker build -t android-nodejs .
8-
- docker run android-nodejs /bin/sh -c "android list && node -v && npm -v"
7+
- docker build -t bee .
8+
- docker run bee /bin/sh -c "android list && node -v && npm -v"

Dockerfile

Lines changed: 114 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,118 @@
11
FROM beevelop/android
22

3-
ENV NODEJS_VERSION=10.16.3 \
4-
PATH=$PATH:/opt/node/bin
3+
ARG BUILD_DATE
4+
ARG BUILD_VERSION
5+
ARG VCS_REF
56

6-
WORKDIR "/opt/node"
7+
LABEL maintainer="Maik Hummel <[email protected]>" \
8+
org.label-schema.build-date=$BUILD_DATE \
9+
org.label-schema.version=$BUILD_VERSION \
10+
org.label-schema.vcs-ref=$VCS_REF \
11+
org.label-schema.schema-version="1.0" \
12+
org.label-schema.vcs-url="https://github.com/beevelop/docker-android-nodejs.git" \
13+
org.label-schema.name="beevelop/android-nodejs" \
14+
org.label-schema.vendor="Maik Hummel (beevelop)" \
15+
org.label-schema.description="Android with Node.js inside a container" \
16+
org.label-schema.url="https://beevelop.com/" \
17+
org.label-schema.license="MIT" \
18+
org.opencontainers.image.title="beevelop/android-nodejs" \
19+
org.opencontainers.image.description="Android with Node.js inside a container" \
20+
org.opencontainers.image.licenses="MIT" \
21+
org.opencontainers.image.authors="Maik Hummel (beevelop)" \
22+
org.opencontainers.image.vendor="Maik Hummel (beevelop)" \
23+
org.opencontainers.image.url="https://github.com/beevelop/docker-android-nodejs" \
24+
org.opencontainers.image.documentation="https://github.com/beevelop/docker-android-nodejs/blob/master/README.md" \
25+
org.opencontainers.image.source="https://github.com/beevelop/docker-android-nodejs.git"
726

8-
RUN apt-get update && apt-get install -y curl git ca-certificates --no-install-recommends && \
9-
curl -sL https://nodejs.org/dist/v${NODEJS_VERSION}/node-v${NODEJS_VERSION}-linux-x64.tar.gz | tar xz --strip-components=1 && \
10-
rm -rf /var/lib/apt/lists/* && \
11-
apt-get clean
27+
# Source of the following lines (all rights belong to the Node.js contributors)
28+
# https://github.com/nodejs/docker-node/blob/master/12/stretch-slim/Dockerfile
29+
# LICENSE: MIT (see https://github.com/nodejs/docker-node/blob/master/LICENSE)
30+
RUN groupadd --gid 1000 node \
31+
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
32+
33+
ENV NODE_VERSION 12.16.1
34+
35+
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
36+
&& case "${dpkgArch##*-}" in \
37+
amd64) ARCH='x64';; \
38+
ppc64el) ARCH='ppc64le';; \
39+
s390x) ARCH='s390x';; \
40+
arm64) ARCH='arm64';; \
41+
armhf) ARCH='armv7l';; \
42+
i386) ARCH='x86';; \
43+
*) echo "unsupported architecture"; exit 1 ;; \
44+
esac \
45+
&& set -ex \
46+
# libatomic1 for arm
47+
&& apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr xz-utils libatomic1 --no-install-recommends \
48+
&& rm -rf /var/lib/apt/lists/* \
49+
&& for key in \
50+
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
51+
FD3A5288F042B6850C66B31F09FE44734EB7990E \
52+
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
53+
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
54+
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
55+
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
56+
77984A986EBC2AA786BC0F66B01FBB92821C587A \
57+
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
58+
4ED778F539E3634C779C87C6D7062848A1AB005C \
59+
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \
60+
B9E2F5981AA6E0CD28160D9FF13993A75599653C \
61+
; do \
62+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
63+
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
64+
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
65+
done \
66+
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
67+
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
68+
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
69+
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
70+
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
71+
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
72+
&& apt-mark auto '.*' > /dev/null \
73+
&& find /usr/local -type f -executable -exec ldd '{}' ';' \
74+
| awk '/=>/ { print $(NF-1) }' \
75+
| sort -u \
76+
| xargs -r dpkg-query --search \
77+
| cut -d: -f1 \
78+
| sort -u \
79+
| xargs -r apt-mark manual \
80+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
81+
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
82+
# smoke tests
83+
&& node --version \
84+
&& npm --version
85+
86+
ENV YARN_VERSION 1.22.0
87+
88+
RUN set -ex \
89+
&& savedAptMark="$(apt-mark showmanual)" \
90+
&& apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr --no-install-recommends \
91+
&& rm -rf /var/lib/apt/lists/* \
92+
&& for key in \
93+
6A010C5166006599AA17F08146C2130DFD2497F5 \
94+
; do \
95+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
96+
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
97+
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
98+
done \
99+
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
100+
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
101+
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
102+
&& mkdir -p /opt \
103+
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
104+
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
105+
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
106+
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
107+
&& apt-mark auto '.*' > /dev/null \
108+
&& { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; } \
109+
&& find /usr/local -type f -executable -exec ldd '{}' ';' \
110+
| awk '/=>/ { print $(NF-1) }' \
111+
| sort -u \
112+
| xargs -r dpkg-query --search \
113+
| cut -d: -f1 \
114+
| sort -u \
115+
| xargs -r apt-mark manual \
116+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
117+
# smoke test
118+
&& yarn --version

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016-2020 Maik Hummel (beevelop)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
![Badges](https://shields.beevelop.com/badge/badges-7-brightgreen.svg?style=flat-square)
66
[![Beevelop](https://links.beevelop.com/honey-badge)](https://beevelop.com)
77

8-
# Latest Android with Node.js `v8` and npm
8+
# Android Q (10) with Node.js `v12` and npm / yarn
99
### based on [beevelop/android](https://github.com/beevelop/docker-android)
1010
----
1111
### Pull from Docker Hub

0 commit comments

Comments
 (0)