-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c9b397
commit f93e1da
Showing
3 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**/*.rs | ||
target/ | ||
!target/release/ckb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM ubuntu:bionic | ||
LABEL description="Nervos CKB is a public permissionless blockchain, the common knowledge layer of Nervos network." | ||
LABEL maintainer="Nervos Core Dev <[email protected]>" | ||
|
||
#build arg | ||
ARG DATADIR=/usr/local/share/ckb | ||
ENV DATADIR ${DATADIR} | ||
|
||
#useradd | ||
RUN groupadd -g 1000 ckb && useradd -m -u 1000 -g ckb -s /bin/sh ckb | ||
|
||
WORKDIR ${DATADIR} | ||
|
||
#apt | ||
RUN apt update && apt install -y --no-install-recommends openssl1.0 libssl1.0 | ||
|
||
#cleanup | ||
RUN apt autoremove -y | ||
RUN apt clean -y | ||
RUN rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* | ||
|
||
#target | ||
COPY target/release/ckb /bin/ckb | ||
|
||
#entrypoint | ||
RUN echo "#!/bin/bash \n ckb \$@" > ./entrypoint.sh | ||
RUN chmod +x ./entrypoint.sh | ||
|
||
# copy "nodes_template" to `WORKDIR`/nodes/ | ||
COPY nodes_template/ nodes/ | ||
RUN chown -R ckb:ckb $DATADIR/nodes | ||
|
||
#switch use | ||
USER ckb | ||
|
||
EXPOSE 8114/tcp 8115/udp | ||
ENTRYPOINT ["./entrypoint.sh"] |