docker-images/nodejs/20_with_yarn/Dockerfile

23 lines
576 B
Docker
Raw Normal View History

2023-10-15 01:24:01 +01:00
# Latest official NodeJS image
2023-11-29 22:57:18 +00:00
FROM node:20-alpine3.17 AS node
2023-10-15 01:24:01 +01:00
2023-10-11 23:15:36 +01:00
FROM docker:latest
2023-03-27 22:37:06 +01:00
2023-10-15 01:43:22 +01:00
WORKDIR /home/container
2023-10-15 01:24:01 +01:00
# Copy Node from the official docker image
COPY --from=node /usr/local/lib /usr/local/lib
COPY --from=node /usr/local/include /usr/local/include
COPY --from=node /usr/local/bin /usr/local/bin
2023-10-15 01:36:26 +01:00
# Install the necessary dependencies for Node.js
RUN apk add --no-cache libstdc++ libgcc
# Install other dependencies
2023-10-15 01:37:35 +01:00
RUN apk add --no-cache curl wget git bash
2023-10-15 01:36:26 +01:00
# Print the version of NodeJS we're running
2023-11-29 22:57:18 +00:00
RUN node --version
# Install yarn
RUN npm install -g yarn --force