summaryrefslogtreecommitdiff
path: root/docker/Dockerfile
diff options
context:
space:
mode:
authorJoe Eaves <jinux@alluha.net>2020-12-18 17:58:34 +0000
committerJoe Eaves <jinux@alluha.net>2020-12-21 03:10:42 +0000
commit60ef9b54fbe35c1a985c3260e8c90158da129399 (patch)
tree00916b001f23f54045fdb8fd5ec6705b8d3af18e /docker/Dockerfile
parenta7df0a02799442ab38e1b365d4363cca6d93f029 (diff)
Integrate improvements from #137
Also fixed a bug with empty quoted strings
Diffstat (limited to 'docker/Dockerfile')
-rw-r--r--docker/Dockerfile37
1 files changed, 21 insertions, 16 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 8f56356c..7f0fb4b0 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,16 +1,24 @@
FROM ubuntu:18.04
-RUN \
- apt-get update -qq && \
- apt-get install -y \
+ARG DEBIAN_FRONTEND=noninteractive
+RUN apt-get update -qq \
+ && apt-get install -y \
# x86_64 / generic packages
- bash git gosu \
- cmake make build-essential \
- wget unzip \
- python3 python3-pip \
+ bash \
+ build-essential \
+ cmake \
+ git \
+ make \
+ python3 \
+ python3-pip \
+ tar \
+ unzip \
+ wget \
# aarch64 packages
- libffi-dev libssl-dev python3-dev \
- && rm -rf /var/lib/apt/lists/*;
+ libffi-dev \
+ libssl-dev \
+ python3-dev \
+ && rm -rf /var/cache/apt/* /var/lib/apt/lists/*;
RUN pip3 install adafruit-nrfutil
@@ -25,13 +33,10 @@ RUN bash -c "source /opt/build.sh; GetNrfSdk;"
# McuBoot
RUN bash -c "source /opt/build.sh; GetMcuBoot;"
-# Set and arg and use it in the env for power to override at build AND runtime
-ARG USER_ID=33333
-ARG GROUP_ID=33333
-ENV USER_ID $USER_ID
-ENV GROUP_ID $GROUP_ID
+ARG PUID=1000
+ARG PGID=1000
+RUN groupadd --system --gid $PGID infinitime && useradd --system --uid $PUID --gid $PGID infinitime
+USER infinitime:infinitime
ENV SOURCES_DIR /sources
-COPY entrypoint.sh /opt/
-ENTRYPOINT ["/opt/entrypoint.sh"]
CMD ["/opt/build.sh"]