2017-01-22 04:59:18 +04:00
|
|
|
FROM alpine:$alpine_version
|
2016-11-23 13:54:22 +04:00
|
|
|
|
2017-01-22 04:59:18 +04:00
|
|
|
LABEL distro_style="apk" distro="alpine" distro_long="alpine-$alpine_version" arch="x86_64" operatingsystem="linux"
|
2016-11-23 13:54:22 +04:00
|
|
|
|
2017-04-17 04:25:20 +04:00
|
|
|
RUN adduser -S tezos && \
|
2017-10-16 23:43:15 +04:00
|
|
|
adduser tezos abuild && \
|
2017-04-17 04:25:20 +04:00
|
|
|
apk update && \
|
2016-11-23 13:54:22 +04:00
|
|
|
apk upgrade && \
|
2017-05-31 20:27:11 +04:00
|
|
|
apk add sudo bash libssl1.0 libsodium libev gmp git snappy && \
|
2017-01-22 04:59:18 +04:00
|
|
|
rm -f /var/cache/apk/* && \
|
2016-11-23 13:54:22 +04:00
|
|
|
echo 'tezos ALL=(ALL:ALL) NOPASSWD:ALL' > /etc/sudoers.d/tezos && \
|
|
|
|
chmod 440 /etc/sudoers.d/tezos && \
|
|
|
|
chown root:root /etc/sudoers.d/tezos && \
|
2017-01-22 04:59:18 +04:00
|
|
|
sed -i 's/^Defaults.*requiretty//g' /etc/sudoers
|
2017-10-16 23:43:15 +04:00
|
|
|
|
2016-11-23 13:54:22 +04:00
|
|
|
USER tezos
|
|
|
|
|
2017-01-22 04:59:18 +04:00
|
|
|
COPY . /home/tezos
|
2017-10-16 23:43:15 +04:00
|
|
|
|
2016-11-23 13:54:22 +04:00
|
|
|
WORKDIR /home/tezos
|
2017-01-22 04:59:18 +04:00
|
|
|
|
2017-10-16 23:43:15 +04:00
|
|
|
RUN sudo apk update && \
|
|
|
|
sudo apk add abuild build-base snappy-dev && \
|
|
|
|
abuild-keygen -ai && \
|
|
|
|
mkdir leveldb-1.18 && \
|
|
|
|
cp scripts/leveldb-1.18.APKBUILD leveldb-1.18/APKBUILD && \
|
|
|
|
cd leveldb-1.18 && \
|
|
|
|
abuild checksum && abuild -r && \
|
|
|
|
cd .. && \
|
|
|
|
sudo apk del build-base snappy-dev abuild && \
|
|
|
|
sudo apk add packages/tezos/x86_64/leveldb-1.18-r0.apk && \
|
|
|
|
rm -rf leveldb-1.18 packages && \
|
|
|
|
sudo rm -f /var/cache/apk/*
|
|
|
|
|
2017-01-22 04:59:18 +04:00
|
|
|
RUN sudo chown root:root bin/* && \
|
|
|
|
sudo chmod a+rx bin/* && \
|
|
|
|
sudo mv bin/* /usr/local/bin && \
|
|
|
|
rmdir bin
|
|
|
|
|
2017-03-09 17:43:59 +04:00
|
|
|
RUN sudo cp scripts/docker_entrypoint.sh /usr/local/bin/tezos && \
|
|
|
|
sudo cp scripts/docker_entrypoint.inc.sh \
|
|
|
|
scripts/client_lib.inc.sh \
|
|
|
|
/usr/local/bin/ && \
|
|
|
|
sudo chmod a+rx /usr/local/bin/tezos
|
|
|
|
|
|
|
|
RUN sudo mkdir -p /var/run/tezos && \
|
|
|
|
sudo chown tezos /var/run/tezos
|
|
|
|
|
|
|
|
ENV EDITOR=vi
|
|
|
|
|
|
|
|
VOLUME /var/run/tezos
|
|
|
|
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/tezos" ]
|