Fix devcontainer build

This commit is contained in:
Felipe Santos 2022-11-19 16:44:22 -03:00
parent 545b0e8b4f
commit fc77d8e6b1
2 changed files with 8 additions and 10 deletions

View File

@ -8,6 +8,7 @@ env:
jobs: jobs:
build_devcontainer: build_devcontainer:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Build Devcontainer
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-node@master - uses: actions/setup-node@master
@ -48,7 +49,7 @@ jobs:
python_checks: python_checks:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Python checks name: Python Checks
steps: steps:
- name: Check out the repository - name: Check out the repository
uses: actions/checkout@v3 uses: actions/checkout@v3

View File

@ -65,7 +65,7 @@ RUN --mount=type=bind,from=wheels,source=/wheels,target=/wheels \
gnupg \ gnupg \
wget \ wget \
procps \ procps \
unzip tzdata libxml2 xz-utils \ unzip locales tzdata libxml2 xz-utils \
python3-pip \ python3-pip \
# add raspberry pi repo # add raspberry pi repo
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9165938D90FDDD2E \ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9165938D90FDDD2E \
@ -94,10 +94,12 @@ RUN --mount=type=bind,from=wheels,source=/wheels,target=/wheels \
fi \ fi \
# arch specific packages # arch specific packages
&& if [ "${TARGETARCH}" = "amd64" ]; then \ && if [ "${TARGETARCH}" = "amd64" ]; then \
# Use debian testing repo only for hwaccel packages
echo 'deb http://deb.debian.org/debian testing main non-free' > /etc/apt/sources.list.d/debian-testing.list \ echo 'deb http://deb.debian.org/debian testing main non-free' > /etc/apt/sources.list.d/debian-testing.list \
&& apt-get -qq update \ && apt-get -qq update \
&& apt-get -qq install --no-install-recommends --no-install-suggests -y \ && apt-get -qq install --no-install-recommends --no-install-suggests -y \
mesa-va-drivers libva-drm2 intel-media-va-driver-non-free i965-va-driver libmfx1; \ mesa-va-drivers libva-drm2 intel-media-va-driver-non-free i965-va-driver libmfx1 \
&& rm -f /etc/apt/sources.list.d/debian-testing.list; \
fi \ fi \
&& if [ "${TARGETARCH}" = "arm64" ]; then \ && if [ "${TARGETARCH}" = "arm64" ]; then \
apt-get -qq install --no-install-recommends --no-install-suggests -y \ apt-get -qq install --no-install-recommends --no-install-suggests -y \
@ -154,14 +156,9 @@ ENTRYPOINT ["/init"]
FROM deps AS deps-node FROM deps AS deps-node
# Install Node 16 # Install Node 16
RUN \ RUN wget -qO- https://deb.nodesource.com/setup_16.x | bash - \
# debian testing repo provides its own nodejs package, so we remove it first \
mv -f /etc/apt/sources.list.d/debian-testing.list /tmp/debian-testing.list\
&& wget -qO- https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y nodejs \ && apt-get install -y nodejs \
&& npm install -g npm@9 \ && npm install -g npm@9
# then we restore the debian testing repo \
&& mv -f /tmp/debian-testing.list /etc/apt/sources.list.d/debian-testing.list
# Devcontainer # Devcontainer
FROM deps-node AS devcontainer FROM deps-node AS devcontainer