mirror of
https://github.com/sethforprivacy/p2pool-docker.git
synced 2025-12-07 08:05:03 -05:00
Automated Image Updates (#17)
* Adds initial workflow file for automatically keeping container images up to date. * TODO: Still requires testing for the cron schedule to ensure that it is working appropriately.
This commit is contained in:
31
.github/workflows/update-image.yml
vendored
Normal file
31
.github/workflows/update-image.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
name: "Update Image"
|
||||||
|
on:
|
||||||
|
# TODO: Remove faster schedule and pull_request once testing is completed.
|
||||||
|
schedule: # Schedled workflows only run once merged into main.
|
||||||
|
- cron: "*/5 * * * *" # Faster schedule for testing.
|
||||||
|
#- cron: "0 12 * * *" # Proposed schedule once testing has completed.
|
||||||
|
pull_request: # Here to ensure the workflow runs during testing. Will be removed once testing is completed.
|
||||||
|
types: [opened, reopened, synchronize]
|
||||||
|
jobs:
|
||||||
|
rebuild-container:
|
||||||
|
name: "Rebuild Container"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# Checkout the repo.
|
||||||
|
- name: "Checkout"
|
||||||
|
uses: "actions/checkout@v2"
|
||||||
|
|
||||||
|
# Build and push the repo.
|
||||||
|
- name: "Build and Push"
|
||||||
|
uses: docker/build-push-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
registry: docker.pkg.github.com
|
||||||
|
repository: ${{ github.repository }}/simple-monerod
|
||||||
|
tags: latest
|
||||||
|
# TODO: Test that a release tag stays assigned to the rebuilt container when release tagged.
|
||||||
|
tag_with_ref: true
|
||||||
|
# TODO: Evaluate if the following are necessary.
|
||||||
|
add_git_labels: true
|
||||||
|
tag_with_sha: true
|
||||||
59
Dockerfile.bak
Normal file
59
Dockerfile.bak
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
# From https://github.com/leonardochaia/docker-monerod/blob/master/src/Dockerfile
|
||||||
|
ARG MONERO_BRANCH=v0.17.1.9
|
||||||
|
|
||||||
|
# Select Ubuntu 20.04LTS for the build image base
|
||||||
|
FROM ubuntu:20.04 as build
|
||||||
|
LABEL author="sethsimmons@pm.me" \
|
||||||
|
maintainer="sethsimmons@pm.me"
|
||||||
|
|
||||||
|
# Dependency list from https://github.com/monero-project/monero#compiling-monero-from-source
|
||||||
|
# Added DEBIAN_FRONTEND=noninteractive to workaround tzdata prompt on installation
|
||||||
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends build-essential cmake \
|
||||||
|
pkg-config libboost-all-dev libssl-dev libzmq3-dev libunbound-dev ca-certificates \
|
||||||
|
libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev \
|
||||||
|
libexpat1-dev doxygen graphviz libpgm-dev qttools5-dev-tools libhidapi-dev \
|
||||||
|
libusb-dev libprotobuf-dev protobuf-compiler libgtest-dev git \
|
||||||
|
libnorm-dev libpgm-dev libusb-1.0-0-dev libudev-dev libgssapi-krb5-2 \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Switch to directory for gtest and make/install libs
|
||||||
|
WORKDIR /usr/src/gtest
|
||||||
|
RUN cmake . && make && cp ./lib/libgtest*.a /usr/lib
|
||||||
|
|
||||||
|
# Switch to Monero source directory
|
||||||
|
WORKDIR /monero
|
||||||
|
|
||||||
|
# Git pull Monero source at specified tag/branch
|
||||||
|
ARG MONERO_BRANCH
|
||||||
|
RUN git clone --recursive --branch ${MONERO_BRANCH} \
|
||||||
|
https://github.com/monero-project/monero . \
|
||||||
|
&& git submodule init && git submodule update
|
||||||
|
|
||||||
|
# Make static Monero binaries
|
||||||
|
RUN make -j4 release-static
|
||||||
|
|
||||||
|
# Select Ubuntu 20.04LTS for the image base
|
||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
# Install remaining dependencies
|
||||||
|
RUN apt-get update && apt-get install --no-install-recommends -y libnorm-dev libpgm-dev libgssapi-krb5-2 \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Add user and setup directories for monerod
|
||||||
|
RUN useradd -ms /bin/bash monero && mkdir -p /home/monero/.bitmonero \
|
||||||
|
&& chown -R monero:monero /home/monero/.bitmonero
|
||||||
|
USER monero
|
||||||
|
|
||||||
|
# Switch to home directory and install newly built monerod binary
|
||||||
|
WORKDIR /home/monero
|
||||||
|
COPY --chown=monero:monero --from=build /monero/build/Linux/*/release/bin/monerod /usr/local/bin/monerod
|
||||||
|
|
||||||
|
# Expose p2p and restricted RPC ports
|
||||||
|
EXPOSE 18080
|
||||||
|
EXPOSE 18089
|
||||||
|
|
||||||
|
# Start monerod with required --non-interactive flag and sane defaults that are overridden by user input (if applicable)
|
||||||
|
ENTRYPOINT ["monerod", "--non-interactive"]
|
||||||
|
CMD ["--rpc-restricted-bind-ip=0.0.0.0", "--rpc-restricted-bind-port=18089", "--no-igd", "--no-zmq", "--enable-dns-blocklist"]
|
||||||
3
Dockerfile.testing
Normal file
3
Dockerfile.testing
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FROM scratch
|
||||||
|
COPY hello /
|
||||||
|
CMD ["/hello"]
|
||||||
Reference in New Issue
Block a user