File tree Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -3,42 +3,30 @@ FROM ubuntu:20.04
3
3
RUN apt-get update --fix-missing
4
4
RUN apt-get install -y \
5
5
apt-utils \
6
- # curl \
7
- # g++ \
8
- # gcc \
9
- # make \
10
6
python3 \
11
7
python3-pip \
12
8
vim \
13
9
zsh
14
10
15
- # prepare arduino-cli for container (install as root)
16
- # RUN curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
17
-
18
11
COPY . /var/www
19
12
WORKDIR "/var/www"
20
13
21
14
RUN pip3 install -r requirements.txt
22
15
23
- # Set user and group
24
- # ARG user=appuser
25
- # ARG group=appuser
26
- # ARG uid=1000
27
- # ARG gid=1000
28
- # RUN groupadd -g ${gid} ${group}
29
- # RUN useradd -u ${uid} -g ${group} -s /bin/sh -m ${user} # <--- the '-m' create a user home directory
30
- # RUN usermod -a -G dialout ${user}
16
+ # Setup appuser and appgroup
17
+ ARG user=appuser
18
+ ARG group=appuser
19
+ ARG uid=1000
20
+ ARG gid=1000
21
+ RUN groupadd -g ${gid} ${group}
22
+ RUN useradd -u ${uid} -g ${group} -s /bin/sh -m ${user} # <--- the '-m' create a user home directory
31
23
32
24
COPY _assets/.zshrc /home/appuser/.zshrc
33
25
COPY _assets/oh-my-zsh /home/appuser/.oh-my-zsh
34
26
35
27
# Switch to user we must not set group to make the configuration done above apply
36
28
# !! if ${user} is not setup correctly the next line might result in group being root !!
37
- # USER ${user}
38
-
39
- # prepare our arduino env (as user)
40
- # RUN arduino-cli upgrade
41
- # RUN arduino-cli core install arduino:avr
29
+ USER ${user}
42
30
43
31
EXPOSE 5000
44
32
You can’t perform that action at this time.
0 commit comments