File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,4 +5,19 @@ Dockerfile
55* .gif
66* .png
77docker
8- docs
8+ docs
9+ node_modules
10+ build
11+ lib
12+ include
13+ __pycache__
14+ * .pyc
15+ * .pyo
16+ * .pyd
17+ .Python
18+ * .so
19+ * .egg-info
20+ .git
21+ .github
22+ .nox
23+ * .log
Original file line number Diff line number Diff line change 3131 context : ./
3232 file : ./Dockerfile
3333 push : true
34- platforms : linux/amd64,linux/arm64
34+ platforms : linux/amd64
35+ cache-from : type=registry,ref=edryslabs/module-pyxtermjs:base-cache
36+ cache-to : type=registry,ref=edryslabs/module-pyxtermjs:base-cache,mode=max
3537 tags : |
3638 edryslabs/module-pyxtermjs:base
3739 edryslabs/module-pyxtermjs:base-${{ github.run_number }}
6062 context : ./docker/arduino
6163 file : ./docker/arduino/Dockerfile
6264 push : true
63- platforms : linux/amd64,linux/arm64
65+ platforms : linux/amd64
66+ cache-from : type=registry,ref=edryslabs/module-pyxtermjs:arduino-cache
67+ cache-to : type=registry,ref=edryslabs/module-pyxtermjs:arduino-cache,mode=max
6468 tags : |
6569 edryslabs/module-pyxtermjs:arduino-v${{ github.run_number }}
6670 edryslabs/module-pyxtermjs:latest
8993 context : ./docker/development
9094 file : ./docker/development/Dockerfile
9195 push : true
92- platforms : linux/amd64,linux/arm64
96+ platforms : linux/amd64
97+ cache-from : type=registry,ref=edryslabs/module-pyxtermjs:development-cache
98+ cache-to : type=registry,ref=edryslabs/module-pyxtermjs:development-cache,mode=max
9399 tags : |
94100 edryslabs/module-pyxtermjs:development-v${{ github.run_number }}
95101 edryslabs/module-pyxtermjs:development
Original file line number Diff line number Diff line change 11FROM ubuntu:22.04
22
3- RUN apt-get update --fix-missing
4- RUN apt-get install -y \
3+ # Install system dependencies
4+ RUN apt-get update --fix-missing && \
5+ apt-get install -y \
56 apt-utils \
67 python3 \
78 python3-pip \
89 vim \
910 htop \
10- zsh
11+ zsh && \
12+ rm -rf /var/lib/apt/lists/*
1113
12- COPY . /var/www
1314WORKDIR "/var/www"
14-
15+ COPY requirements.txt .
1516RUN pip3 install -r requirements.txt
1617
17- # Setup appuser and appgroup
18+ # Setup appuser and appgroup before copying files
1819ARG user=appuser
1920ARG group=appuser
2021ARG uid=1000
2122ARG gid=1000
22- RUN groupadd -g ${gid} ${group}
23- RUN useradd -u ${uid} -g ${group} -s /bin/sh -m ${user} # <--- the '-m' create a user home directory
23+ RUN groupadd -g ${gid} ${group} && \
24+ useradd -u ${uid} -g ${group} -s /bin/sh -m ${user}
2425
26+ # Copy zsh configuration
2527COPY _assets/.zshrc /home/appuser/.zshrc
2628COPY _assets/oh-my-zsh /home/appuser/.oh-my-zsh
2729
30+ # Copy application files
31+ COPY . .
32+
2833# Switch to user we must not set group to make the configuration done above apply
2934# !! if ${user} is not setup correctly the next line might result in group being root !!
3035USER ${user}
You can’t perform that action at this time.
0 commit comments