dash/docker/Dockerfile.GitHubActions
strophy fb311468b7
Docker release CI (#4051)
* feat:add github actions

* add release tag

* multi-arch download

* remove erroneous add command

* install wget properly

* parse tag

* no multi-arch for now

* show vars

* more debug

* show uname

* install certs

* manually mutate tag

* fix syntax

* use env

* remove debug

* try docker meta

* try semver with v

* multi-arch

* remove v

* use tag-match

* match group 1

* prepare for dashpay repo

* optimize dockerfile

* remove unnecessary space

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* Update .github/workflows/release_docker_hub.yml

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-03-24 13:11:50 +03:00

40 lines
1.1 KiB
Docker

FROM ubuntu:bionic
LABEL maintainer="Dash Developers <dev@dash.org>"
LABEL description="Dockerised DashCore"
ARG USER_ID
ARG GROUP_ID
ARG TAG
ENV 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 /dash dash && \
mkdir /dash/.dashcore && \
chown dash:dash -R /dash
RUN apt-get update && \
apt-get -y install --no-install-recommends \
wget \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN mach=$(uname -m) \
&& case $mach in armv7l) arch="arm-linux-gnueabihf"; ;; aarch64) arch="aarch64-linux-gnu"; ;; x86_64) arch="x86_64-linux-gnu"; ;; *) echo "ERROR: Machine type $mach not supported."; ;; esac \
&& wget https://github.com/dashpay/dash/releases/download/v${TAG}/dashcore-${TAG}-$arch.tar.gz -P /tmp \
&& tar -xvf /tmp/dashcore-*.tar.gz -C /tmp/ \
&& cp /tmp/dashcore*/bin/* /usr/local/bin \
&& rm -rf /tmp/dashcore* \
&& chmod a+x /usr/local/bin/*
USER dash
VOLUME ["/dash"]
EXPOSE 9998 9999 19998 19999
WORKDIR /dash