-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (23 loc) · 616 Bytes
/
Dockerfile
File metadata and controls
32 lines (23 loc) · 616 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM ubuntu:focal
ENV COIN_NAME=litecoind
ENV DEBIAN_FRONTEND=noninteractive
ENV HOME=/opt
# Install dependencies
RUN apt-get update
RUN apt-get install --yes curl iproute2 gnupg2 sudo
# Add user
RUN useradd -s /bin/bash -d $HOME $COIN_NAME
RUN usermod -aG sudo $COIN_NAME
RUN echo "$COIN_NAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Copy project files to WORKDIR
COPY . $HOME
# Fix permissions
RUN chown -Rv $COIN_NAME:$COIN_NAME $HOME
RUN chmod +x $HOME/*.sh
# Change the working directory
WORKDIR $HOME
# Set the user
USER $COIN_NAME
# Ru the entrypoint script
ENTRYPOINT ["./entrypoint.sh"]
CMD ["sh"]