mirror of
https://github.com/minoplhy/docker-ripe-atlas.git
synced 2025-04-21 20:36:58 +00:00
allow changing of UID/GID during docker build (#6)
This commit is contained in:
parent
0707df1063
commit
6ac4f71fdf
@ -20,7 +20,12 @@ ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY --from=builder /root/atlasswprobe-*.deb /tmp
|
||||
|
||||
ARG ATLAS_UID=101
|
||||
ARG ATLAS_GID=999
|
||||
RUN ln -s /bin/true /bin/systemctl \
|
||||
&& adduser --system --uid $ATLAS_UID atlas \
|
||||
&& groupadd --force --system --gid $ATLAS_GID atlas \
|
||||
&& usermod -aG atlas atlas \
|
||||
&& apt-get update -y \
|
||||
&& apt-get install -y libcap2-bin iproute2 openssh-client procps net-tools gosu \
|
||||
&& dpkg -i /tmp/atlasswprobe-*.deb \
|
||||
@ -31,8 +36,6 @@ RUN ln -s /bin/true /bin/systemctl \
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin
|
||||
RUN chmod +x /usr/local/bin/* \
|
||||
&& groupadd -fr atlas \
|
||||
&& usermod -aG atlas atlas \
|
||||
&& chown -R atlas:atlas /var/atlas-probe \
|
||||
&& mkdir -p /var/atlasdata \
|
||||
&& chown -R atlas:atlas /var/atlasdata \
|
||||
|
@ -100,12 +100,12 @@ jobs:
|
||||
command: logout
|
||||
|
||||
- bash: |
|
||||
docker system prune --all --force --filter "label=image=ripe-atlas-builder"
|
||||
docker system prune --all --force --filter "label=image=ripe-atlas"
|
||||
|
||||
docker volume prune --force --filter "label=image=ripe-atlas-builder"
|
||||
docker volume prune --force --filter "label=image=ripe-atlas"
|
||||
|
||||
docker system prune --all --force --filter "label=image=ripe-atlas-builder"
|
||||
docker system prune --all --force --filter "label=image=ripe-atlas"
|
||||
|
||||
docker start watchtower || true
|
||||
|
||||
displayName: "Clean up"
|
||||
|
Loading…
x
Reference in New Issue
Block a user