2023-10-19 23:16:10 -04:00
|
|
|
# Copyright 2023 Foster Hangdaan
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
|
2024-03-14 23:30:01 -04:00
|
|
|
ARG MONERO_VERSION=v0.18.3.2
|
|
|
|
ARG PACKAGE_HASH=9dafd70230a7b3a73101b624f3b5f439cc5b84a19b12c17c24e6aab94b678cbb
|
2023-10-19 23:16:10 -04:00
|
|
|
ARG PACKAGE_NAME=monero-linux-x64-${MONERO_VERSION}.tar.bz2
|
|
|
|
|
|
|
|
# download and unpack stage
|
2023-10-20 06:41:46 -04:00
|
|
|
FROM docker.io/library/ubuntu:22.04 as downloader
|
2023-10-19 23:16:10 -04:00
|
|
|
|
|
|
|
RUN set -ex && \
|
|
|
|
apt-get update && \
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends --yes install \
|
2023-10-19 23:43:20 -04:00
|
|
|
bzip2 \
|
2023-10-19 23:16:10 -04:00
|
|
|
ca-certificates \
|
|
|
|
wget
|
|
|
|
|
|
|
|
WORKDIR /monero
|
|
|
|
|
|
|
|
ARG MONERO_VERSION
|
|
|
|
ARG PACKAGE_HASH
|
|
|
|
ARG PACKAGE_NAME
|
|
|
|
RUN set -ex && \
|
|
|
|
wget --quiet https://downloads.getmonero.org/cli/${PACKAGE_NAME} && \
|
|
|
|
echo "${PACKAGE_HASH} ${PACKAGE_NAME}" | sha256sum --check && \
|
|
|
|
mkdir ./tmp && \
|
|
|
|
tar -xjf ${PACKAGE_NAME} -C ./tmp --strip-components 1
|
|
|
|
|
|
|
|
|
|
|
|
# runtime stage
|
2023-10-20 06:41:46 -04:00
|
|
|
FROM docker.io/library/ubuntu:22.04
|
2023-10-19 23:16:10 -04:00
|
|
|
|
|
|
|
LABEL maintainer="Foster Hangdaan <foster@hangdaan.email>"
|
|
|
|
|
|
|
|
RUN set -ex && \
|
|
|
|
apt-get update && \
|
2023-10-20 06:42:24 -04:00
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends --yes install ca-certificates && \
|
2023-10-19 23:16:10 -04:00
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt
|
|
|
|
COPY --from=downloader /monero/tmp/monerod /monero/tmp/monero-wallet* /usr/local/bin/
|
|
|
|
|
|
|
|
# Create monero user
|
|
|
|
RUN adduser --system --group --disabled-password monero && \
|
|
|
|
mkdir -p /wallet /home/monero/.bitmonero && \
|
|
|
|
chown -R monero:monero /home/monero/.bitmonero && \
|
|
|
|
chown -R monero:monero /wallet
|
|
|
|
|
|
|
|
# Contains the blockchain
|
|
|
|
VOLUME /home/monero/.bitmonero
|
|
|
|
|
|
|
|
# Generate your wallet via accessing the container and run:
|
|
|
|
# cd /wallet
|
|
|
|
# monero-wallet-cli
|
|
|
|
VOLUME /wallet
|
|
|
|
|
|
|
|
EXPOSE 18080
|
|
|
|
EXPOSE 18081
|
|
|
|
EXPOSE 18089
|
|
|
|
|
|
|
|
# switch to user monero
|
|
|
|
USER monero
|
|
|
|
|
|
|
|
ENTRYPOINT ["monerod"]
|
|
|
|
CMD ["--p2p-bind-ip=0.0.0.0", "--p2p-bind-port=18080", "--rpc-bind-ip=0.0.0.0", "--rpc-bind-port=18081", "--rpc-restricted-bind-ip=0.0.0.0", "--rpc-restricted-bind-port=18089", "--non-interactive", "--confirm-external-bind"]
|