Use the node source apt repo
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m7s
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m7s
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -5,16 +5,9 @@ RUN sudo apt update && sudo apt upgrade -y
|
|||||||
RUN sudo apt install curl golang-go delve git -y
|
RUN sudo apt install curl golang-go delve git -y
|
||||||
|
|
||||||
# install nvm
|
# install nvm
|
||||||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash
|
RUN curl -fsSL https://deb.nodesource.com/setup_24.x | sudo bash -
|
||||||
|
|
||||||
# set env
|
RUN sudo apt install -y nodejs
|
||||||
ENV NVM_DIR="/home/coder/.nvm"
|
|
||||||
|
|
||||||
# install node
|
|
||||||
RUN bash -c "source $NVM_DIR/nvm.sh && nvm install --lts"
|
|
||||||
|
|
||||||
# install buf
|
|
||||||
RUN bash -c "source $NVM_DIR/nvm.sh && npm install -g @bufbuild/buf"
|
|
||||||
|
|
||||||
ENTRYPOINT ["bash", "-c", "source $NVM_DIR/nvm.sh && exec \"$@\"", "--"]
|
|
||||||
|
|
||||||
|
RUN node -v
|
||||||
|
RUN npm -v
|
||||||
|
|||||||
Reference in New Issue
Block a user