Skip to content

Commit

Permalink
feat: run as non root user warden
Browse files Browse the repository at this point in the history
  • Loading branch information
jlehtimaki committed Nov 5, 2024
1 parent 91a1c1f commit 93a5695
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
FROM ubuntu:22.04 as wardend

RUN apt-get update && apt-get install -y \
ca-certificates \
wget \
unzip \
&& rm -rf /var/lib/apt/lists/*
ca-certificates \
wget \
unzip \
&& rm -rf /var/lib/apt/lists/*

RUN wget https://github.com/warden-protocol/wardenprotocol/releases/download/v0.5.0/wardend_Linux_x86_64.zip -O /tmp/wardend.zip \
&& unzip /tmp/wardend.zip -d ./ \
&& rm /tmp/wardend.zip
RUN wget https://github.com/warden-protocol/wardenprotocol/releases/download/v0.5.3/wardend_Linux_x86_64.zip -O /tmp/wardend.zip \
&& unzip /tmp/wardend.zip -d ./ \
&& rm /tmp/wardend.zip

FROM ubuntu:22.04

RUN apt-get update && apt-get install -y \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

COPY discord-faucet /usr/bin/discord-faucet
COPY --from=wardend /wardend /usr/bin/wardend
RUN groupadd -r warden && useradd --no-log-init -r -g warden warden

USER warden

WORKDIR /app

COPY discord-faucet /app/discord-faucet
COPY --from=wardend /tmp/wardend /app/wardend

CMD ["/usr/bin/discord-faucet"]

0 comments on commit 93a5695

Please sign in to comment.