Skip to content

Instantly share code, notes, and snippets.

@selvalogesh
Last active December 31, 2023 15:34
Show Gist options
  • Save selvalogesh/a6b8929078b1ed86ab4ee49e962156a8 to your computer and use it in GitHub Desktop.
Save selvalogesh/a6b8929078b1ed86ab4ee49e962156a8 to your computer and use it in GitHub Desktop.
Ubuntu development environment for vs-code container isolated development
version: '3.7'
services:
dev-env:
build: .
image: selvalogesh/ubuntudevenvironment
tty: true
stdin_open: true
ports:
- 49153:49153
working_dir: /home
volumes:
- ./:/home
volumes:
node_modules:
FROM ubuntu:latest
# Install base dependencies
RUN apt-get update \
&& apt-get install -y -q --no-install-recommends \
apt-transport-https \
build-essential \
ca-certificates \
curl \
git \
libssl-dev \
wget \
nano \
bash \
&& rm -rf /var/lib/apt/lists/*
ENV NODE_VERSION v16.20.2
RUN wget -qO- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
RUN bash -i -c "nvm install --lts \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default \
&& npm install -g @angular/cli@16.2.10"
RUN bash -i -c 'git config --global user.editor "nano" \
&& git config --global init.defaultBranch main \
&& git config --global user.name "selvalogesh" \
&& git config --global user.email "selvalogesh95@gmail.com"'
WORKDIR /home
# To keep the container awake, later for opening terminal into the container
CMD tail -f /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment