Skip to content

Commit

Permalink
Merge pull request #19 from warden-protocol/non-root
Browse files Browse the repository at this point in the history
feat: run as non root user warden
  • Loading branch information
jlehtimaki authored Nov 5, 2024
2 parents 91a1c1f + 93a5695 commit ae50f32
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 ae50f32

Please sign in to comment.