forked from cipherzzz/cardano-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (24 loc) · 1.16 KB
/
Dockerfile
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
FROM ubuntu:18.04
RUN apt-get update &&\
apt-get install -y git curl bzip2 nginx sudo nano &&\
useradd -ms /bin/bash cardano &&\
mkdir -m 0755 /nix &&\
chown cardano /nix &&\
mkdir -p /etc/nix &&\
echo binary-caches = https://cache.nixos.org https://hydra.iohk.io > /etc/nix/nix.conf &&\
echo binary-cache-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= >> /etc/nix/nix.conf &&\
su - cardano -c 'git clone https://github.com/input-output-hk/cardano-sl.git /home/cardano/cardano-sl'
ADD default.conf /etc/nginx/conf.d/
ADD start-cardano-container.sh /home/cardano/cardano-sl/
RUN chmod a+x /home/cardano/cardano-sl/start-cardano-container.sh
RUN echo "cardano ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER cardano
ENV USER cardano
RUN curl https://nixos.org/releases/nix/nix-2.1/install | sh
WORKDIR /home/cardano/cardano-sl
RUN git remote update
RUN git fetch
RUN git checkout 3.0.1
RUN . /home/cardano/.nix-profile/etc/profile.d/nix.sh &&\
nix-build -A connectScripts.mainnet.wallet -o connect-to-mainnet
CMD /home/cardano/cardano-sl/start-cardano-container.sh