mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
bc20ef6bf5
## Issue being fixed or feature implemented Automation in private dashevo GitHub was failing due to the branch trying to be built not having the automation be the newer tagged based system. as such, if you simply tag a commit from the dashpay repo and try to build it using automation, the build would fail. This should resolve the issue. Recommended to BP so that we don't have this issue when building v19.x branch builds ## What was done? ## How Has This Been Tested? Creating a docker image should now be as simple pushing a branch and tag to dashevo/dash; start the automation on branch develop with tag previously specified ## Breaking Changes ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation **For repository code-owners and collaborators only** - [x] I have assigned this pull request to a milestone
46 lines
1.2 KiB
Docker
46 lines
1.2 KiB
Docker
# syntax=docker/dockerfile:1.3
|
|
FROM ubuntu:focal
|
|
LABEL maintainer="Dash Developers <dev@dash.org>"
|
|
LABEL description="Dockerised DashCore"
|
|
|
|
ARG USER_ID
|
|
ARG GROUP_ID
|
|
ARG TAG
|
|
|
|
ENV HOME /home/dash
|
|
|
|
# add user with specified (or default) user/group ids
|
|
ENV USER_ID ${USER_ID:-1000}
|
|
ENV GROUP_ID ${GROUP_ID:-1000}
|
|
RUN groupadd -g ${GROUP_ID} dash && \
|
|
useradd -u ${USER_ID} -g dash -s /bin/bash -m -d /home/dash dash && \
|
|
mkdir /home/dash/.dashcore && \
|
|
chown ${USER_ID}:${GROUP_ID} -R /home/dash
|
|
|
|
RUN apt-get update && \
|
|
apt-get -y install --no-install-recommends \
|
|
wget \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY dashcore-binaries/${TAG}/dashcore* /home/dash
|
|
|
|
RUN mach=$(uname -m) \
|
|
&& case $mach in aarch64) arch="aarch64-linux-gnu"; ;; x86_64) arch="x86_64-linux-gnu"; ;; *) echo "ERROR: Machine type $mach not supported."; ;; esac \
|
|
&& cd /home/dash \
|
|
&& tar xvzf dashcore*$arch.tar.gz \
|
|
&& echo $(ls -1 /home/dash) \
|
|
&& cp dashcore-*/bin/* /usr/local/bin \
|
|
&& rm -rf dash*
|
|
|
|
USER dash
|
|
|
|
VOLUME ["/home/dash"]
|
|
|
|
COPY dash/contrib/containers/deploy/docker-entrypoint.sh /docker-entrypoint.sh
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
EXPOSE 9998 9999 19998 19999
|
|
|
|
WORKDIR /home/dash
|