Created
May 27, 2020 11:00
-
-
Save aruss/0dbe04897c9c85fea125245eecc21c6d to your computer and use it in GitHub Desktop.
Node development without node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -it ^ | |
--network host ^ | |
-v %cd%:/project ^ | |
-w /project ^ | |
aruss/nodedev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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