Skip to content

Commit

Permalink
Dockerfile docs node18 - update so we can use vitepress (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishwillee authored Apr 4, 2024
1 parent 80df74d commit e88c9b3
Showing 1 changed file with 7 additions and 25 deletions.
32 changes: 7 additions & 25 deletions docker/Dockerfile_docs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# PX4 docs build environment
#

FROM ubuntu:focal
FROM ubuntu:jammy
LABEL maintainer="Daniel Agar <[email protected]>"

RUN apt-get update \
Expand All @@ -12,8 +12,6 @@ RUN apt-get update \
git \
gosu \
libfontconfig \
npm \
nodejs \
ruby-dev \
zlib1g-dev \
curl \
Expand All @@ -24,27 +22,14 @@ RUN apt-get update \
&& apt-get clean autoclean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*

# Setup sources for getting yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# Install Node.js 18 and npm
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
yarn \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*

# Set up to install nodejs in version (12) required for worker scripts
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
nodejs \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
# Install yarn
RUN npm install --global yarn

# Install html-proofer
RUN gem install html-proofer

# create user with id 1001 (jenkins docker workflow default)
Expand All @@ -54,9 +39,6 @@ USER user
ENV NPM_CONFIG_PREFIX=/home/user/.npm-global
ENV PATH=$PATH:/home/user/.npm-global/bin

RUN npm config set registry http://registry.npmjs.org/ \
&& npm install gitbook-cli -g --unsafe-perm=true

ENV TERM=xterm
ENV TZ=UTC

Expand Down

0 comments on commit e88c9b3

Please sign in to comment.