forked from gnosis/powersoftau
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (37 loc) · 1.04 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM rust:1.33-slim
MAINTAINER [email protected]
WORKDIR /app
# Install system libs
RUN apt-get update && apt-get install -y --no-install-recommends \
lftp \
curl \
openssh-server \
xxd
RUN rm -rf /var/lib/apt/lists/*
#Build rust libraries
COPY Cargo.toml ./
RUN mkdir src && touch src/lib.rs && cargo build
# Copy project files into Docker
COPY src/. src/.
#PID file for storage of cron-pids
#and create config file for validation script
#and create .ssh folder for storage of ssh keys
RUN touch /root/forever.pid \
&& mkdir /app/config \
&& mkdir /root/.ssh
#COPY scripts to docker
COPY scripts/build_all.sh scripts/build_all.sh
# Build project
RUN sh scripts/build_all.sh
#COPY other files
COPY test/. test/.
COPY variables.sh ./
COPY scripts/. scripts/.
# Signal handling for PID1 https://github.com/krallin/tini
ENV TINI_VERSION v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
#support for sftp
EXPOSE 22
# Run the command on container startup
ENTRYPOINT ["/tini", "--"]