Skip to content

Commit

Permalink
added new image
Browse files Browse the repository at this point in the history
  • Loading branch information
snake-py committed Nov 28, 2024
1 parent 7779bd4 commit 78e8943
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-docker-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ jobs:
publish_node_pnpm:
runs-on: ubuntu-latest
env:
IMAGE_NAME: "node-pnpm"
IMAGE_NAME: "node"
LANGUAGE: "node"
LANGUAGE_VERSION: 20
LANGUAGE_VERSION: 18
steps:
- uses: actions/checkout@v2
- run: echo ${DOCKER_HUB_PASSWORD} | docker login --username "${DOCKER_HUB_USER}" --password-stdin
Expand Down
19 changes: 0 additions & 19 deletions node-pnpm/Dockerfile

This file was deleted.

39 changes: 39 additions & 0 deletions node/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive

RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get clean

# Set the locale
RUN apt update
RUN apt-get install -y locales
RUN locale-gen en_US.UTF-8

ENV LANGUAGE=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
ENV LC_CTYPE=UTF-8
ENV LANG=en_US.UTF-8


# Install apt dependencies
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN apt-get -y install curl wget jq git nano vim unzip zip

# Install Node.js
ENV NODE_VERSION=18.19.0
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
ENV NVM_DIR=/root/.nvm
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
RUN node --version
RUN npm --version

# install node packages
RUN npm install -g nodemon
RUN npm i -g cross-env


# install pnpm
RUN wget -qO- https://get.pnpm.io/install.sh | ENV="$HOME/.bashrc" SHELL="$(which bash)" bash -

0 comments on commit 78e8943

Please sign in to comment.