-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Update CI configuration to rebuild the image each day
Showing
3 changed files
with
90 additions
and
482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,67 @@ | ||
# [Choice] Debian / Ubuntu version: debian-10, debian-9, ubuntu-20.04, ubuntu-18.04 | ||
ARG VARIANT=ubuntu-20.04 | ||
FROM letssteam/arm-gcc-none-eabi-toolchain:latest | ||
|
||
ENV NODE_VERSION 14.16.1 | ||
# Install any needed packages by codal | ||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \ | ||
apt-get update && \ | ||
apt-get upgrade -y -q && \ | ||
apt-get install -y -q \ | ||
clang-tidy \ | ||
clang-format \ | ||
openocd \ | ||
ncurses-dev \ | ||
libudev-dev \ | ||
ninja-build \ | ||
python3 \ | ||
python3-pip \ | ||
python3-setuptools \ | ||
python3-wheel && \ | ||
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \ | ||
update-alternatives --install /usr/bin/python-config python-config /usr/bin/python3-config 1 && \ | ||
update-alternatives --install /usr/bin/pydoc pydoc /usr/bin/pydoc3 1 && \ | ||
apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ | ||
&& case "${dpkgArch##*-}" in \ | ||
amd64) ARCH='x64';; \ | ||
ppc64el) ARCH='ppc64le';; \ | ||
s390x) ARCH='s390x';; \ | ||
arm64) ARCH='arm64';; \ | ||
armhf) ARCH='armv7l';; \ | ||
i386) ARCH='x86';; \ | ||
*) echo "unsupported architecture"; exit 1 ;; \ | ||
esac \ | ||
# gpg keys listed at https://github.com/nodejs/node#release-keys | ||
&& set -ex \ | ||
&& for key in \ | ||
4ED778F539E3634C779C87C6D7062848A1AB005C \ | ||
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ | ||
74F12602B6F1C4E913FAA37AD3A89613643B6201 \ | ||
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ | ||
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ | ||
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ | ||
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \ | ||
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ | ||
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \ | ||
108F52B48DB57BB0CC439B2997B01419BD92F80A \ | ||
B9E2F5981AA6E0CD28160D9FF13993A75599653C \ | ||
; do \ | ||
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ | ||
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ | ||
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ | ||
done \ | ||
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \ | ||
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ | ||
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ | ||
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ | ||
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ | ||
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ | ||
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \ | ||
# smoke tests | ||
&& node --version \ | ||
&& npm --version | ||
# Install Github CLI | ||
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \ | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \ | ||
sudo apt update && \ | ||
sudo apt install gh && \ | ||
apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* | ||
|
||
ENV YARN_VERSION 1.22.5 | ||
|
||
RUN set -ex \ | ||
&& for key in \ | ||
6A010C5166006599AA17F08146C2130DFD2497F5 \ | ||
; do \ | ||
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ | ||
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ | ||
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ | ||
done \ | ||
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ | ||
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \ | ||
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ | ||
&& mkdir -p /opt \ | ||
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \ | ||
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \ | ||
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ | ||
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ | ||
# smoke test | ||
&& yarn --version | ||
|
||
# Install needed packages, yarn, nvm and setup non-root user. Use a separate RUN statement to add your own dependencies. | ||
ARG NPM_GLOBAL=/usr/local/share/npm-global | ||
ENV NVM_DIR=/usr/local/share/nvm | ||
ENV NVM_SYMLINK_CURRENT=true \ | ||
PATH=${NPM_GLOBAL}/bin:${NVM_DIR}/current/bin:${PATH} | ||
|
||
ARG USERNAME=vscode | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
RUN if ! cat /etc/group | grep -e "^npm:" > /dev/null 2>&1; then groupadd -r npm; fi \ | ||
&& usermod -a -G npm ${USERNAME} \ | ||
&& umask 0002 \ | ||
&& mkdir -p ${NPM_GLOBAL} \ | ||
&& chown ${USERNAME}:npm ${NPM_GLOBAL} \ | ||
&& chmod g+s ${NPM_GLOBAL} \ | ||
&& npm config -g set prefix ${NPM_GLOBAL} \ | ||
&& sudo -u ${USERNAME} npm config -g set prefix ${NPM_GLOBAL} \ | ||
&& su ${USERNAME} -c "umask 0002 && npm install -g eslint pxt npm" \ | ||
&& npm cache clean --force > /dev/null 2>&1 \ | ||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /root/.gnupg /tmp/library-scripts | ||
# Install dependency for chromium headless | ||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \ | ||
sudo apt update && \ | ||
sudo apt-get install -y -q \ | ||
libx11-xcb1 \ | ||
libxcomposite1 \ | ||
libasound2 \ | ||
libatk1.0-0 \ | ||
libatk-bridge2.0-0 \ | ||
libcairo2 \ | ||
libcups2 \ | ||
libdbus-1-3 \ | ||
libexpat1 \ | ||
libfontconfig1 \ | ||
libgbm1 \ | ||
libgcc1 \ | ||
libglib2.0-0 \ | ||
libgtk-3-0 \ | ||
libnspr4 \ | ||
libpango-1.0-0 \ | ||
libpangocairo-1.0-0 \ | ||
libstdc++6 \ | ||
libx11-6 \ | ||
libx11-xcb1 \ | ||
libxcb1 \ | ||
libxcomposite1 \ | ||
libxcursor1 \ | ||
libxdamage1 \ | ||
libxext6 \ | ||
libxfixes3 \ | ||
libxi6 \ | ||
libxrandr2 \ | ||
libxrender1 \ | ||
libxss1 \ | ||
libxtst6 && \ | ||
apt-get autoremove -y && \ | ||
apt-get clean -y && \ | ||
rm -rf /var/lib/apt/lists/* |
This file was deleted.
Oops, something went wrong.