Skip to content

Instantly share code, notes, and snippets.

@aruss
Created May 27, 2020 11:00
Show Gist options
  • Save aruss/0dbe04897c9c85fea125245eecc21c6d to your computer and use it in GitHub Desktop.
Save aruss/0dbe04897c9c85fea125245eecc21c6d to your computer and use it in GitHub Desktop.
Node development without node
FROM ubuntu:18.04
LABEL maintainer="russlan@dynabase.de"
LABEL version="0.1"
LABEL description="This is custom image for node projects development"
# Disable prompt during packages installation
ARG DEBIAN_FRONTEND=noninteractive
# Update repository and install all common required bits and pieces
RUN apt update
RUN apt install -y apt-utils curl curl dirmngr apt-transport-https lsb-release ca-certificates
# Install nodejs 10
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash \
&& apt update \
&& apt -y install nodejs
# Install yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt update \
&& apt install -y --no-install-recommends yarn
docker run --rm -it ^
--network host ^
-v %cd%:/project ^
-w /project ^
aruss/nodedev
#!/bin/bash
docker run --rm -it \
--network host
-v ${PWD}:/project \
-w /project \
-u $(id -u ${USER}):$(id -g ${USER}) \
aruss/nodedev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment