-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (23 loc) · 1.03 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM ubuntu:20.04
# install the latest updates with no cache from apt
RUN apt update && apt upgrade -y && apt full-upgrade -y && apt autoclean -y \
&& apt autoremove
# install misc. packages we need
RUN apt install curl git sudo -y
# install nodejs 10.x
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get install -y nodejs
# install the Foundation CLI
# use the myUserID argument from docker-compose
ARG myUserID
# create a user with name "dev" with a home directory in /home/dev and the user id and group id will be the value of $myUserID
# add the user to the "sudo" group and have the user to have the password, "dev"
RUN useradd -m -u ${myUserID} dev && usermod -aG sudo dev && echo 'dev:dev' | chpasswd
# switch to the dev user
USER dev
RUN mkdir /home/dev/workspace
# Set the default working directory to /home/dev/workspace
WORKDIR /home/dev/workspace
# note to the user we want to expose port 3000 for local development
EXPOSE 8000