From 5730c0ef00fcda44cab83cc66ea2243aa42afd27 Mon Sep 17 00:00:00 2001 From: Colin Lyons Date: Thu, 22 Dec 2022 16:51:06 +0000 Subject: [PATCH] Moving to a single indra executable. --- cmd/indcli/main.go | 5 ----- cmd/{ind => indra}/main.go | 4 ++-- docker/{ind => indra}/Dockerfile | 26 +++++++++++++------------- version.go | 2 +- 4 files changed, 16 insertions(+), 21 deletions(-) delete mode 100644 cmd/indcli/main.go rename cmd/{ind => indra}/main.go (96%) rename docker/{ind => indra}/Dockerfile (64%) diff --git a/cmd/indcli/main.go b/cmd/indcli/main.go deleted file mode 100644 index 79058077..00000000 --- a/cmd/indcli/main.go +++ /dev/null @@ -1,5 +0,0 @@ -package main - -func main() { - -} diff --git a/cmd/ind/main.go b/cmd/indra/main.go similarity index 96% rename from cmd/ind/main.go rename to cmd/indra/main.go index d3a6dd70..c2145d94 100644 --- a/cmd/ind/main.go +++ b/cmd/indra/main.go @@ -15,7 +15,7 @@ var ( log = log2.GetLogger(indra.PathBase) check = log.E.Chk commands = &cmds.Command{ - Name: "ind", + Name: "indra", Description: "The indra network daemon.", Documentation: lorem, Entrypoint: func(c *cmds.Command, args []string) error { @@ -35,7 +35,7 @@ var ( Commands: cmds.Commands{ { Name: "version", - Description: "print ind version", + Description: "print indra version", Documentation: lorem, Entrypoint: func(c *cmds.Command, args []string) error { diff --git a/docker/ind/Dockerfile b/docker/indra/Dockerfile similarity index 64% rename from docker/ind/Dockerfile rename to docker/indra/Dockerfile index 3ed6a02e..d3d09506 100644 --- a/docker/ind/Dockerfile +++ b/docker/indra/Dockerfile @@ -2,20 +2,20 @@ FROM golang:1.19.4 AS builder # User/Group definition -ENV USER=ind UID=8337 GID=8337 +ENV USER=indra GROUP=indra UID=8337 GID=8337 -# Create a user/group for ind, to be migrated to the target container -RUN addgroup "ind" --gid ${GID} \ +# Create a user/group for indra, to be migrated to the target container +RUN addgroup ${GROUP} --gid ${GID} \ && adduser \ --disabled-password \ --gecos "" \ - --home "/var/ind" \ + --home "/var/indra" \ --shell "/sbin/nologin" \ #--no-create-home \ --uid "${UID}" \ --gid "${GID}" \ "${USER}" \ - && mkdir -pv /var/ind/.ind && chown -R ind:ind /var/ind + && mkdir -pv /var/indra/.indra && chown -R indra:indra /var/indra # Source/Target build defaults ARG ARCH=amd64 @@ -30,9 +30,9 @@ RUN set -ex \ # && if [ "${ARCH}" = "amd64" ]; then export GOARCH=amd64; fi \ # && if [ "${ARCH}" = "arm32v7" ]; then export GOARCH=arm; fi \ # && if [ "${ARCH}" = "arm64v8" ]; then export GOARCH=arm64; fi \ - && go install -v ./cmd/ind/main.go \ + && go install -v ./cmd/indra/main.go \ && mkdir -pv /build/bin \ - && CGO_ENABLED=0 go build --ldflags '-w -s' -o /build/bin/ind ./cmd/ind/. + && CGO_ENABLED=0 go build --ldflags '-w -s' -o /build/bin/indra ./cmd/indra/. # --- # Configure and Build the target container @@ -46,19 +46,19 @@ COPY --from=builder /etc/group /etc/group # Migrate the binaries COPY --from=builder /build/bin /bin -COPY --from=builder /var/ind /var/ind +COPY --from=builder /var/indra /var/indra # Enable the btcd user -USER ind:ind +USER indra:indra # ENV defaults # ENV IND_LOGFILEPATH="" # Set the data volume -#VOLUME ["/ind"] +#VOLUME ["/indra"] -# :8337 ind peer-to-peer port -# :8338 ind RPC port +# :8337 indra peer-to-peer port +# :8338 indra RPC port EXPOSE 8337 8338 -ENTRYPOINT ["/bin/ind"] \ No newline at end of file +ENTRYPOINT ["/bin/indra"] diff --git a/version.go b/version.go index 8b5a94ca..f06a9b8a 100644 --- a/version.go +++ b/version.go @@ -11,7 +11,7 @@ var ( // URL is the git URL for the repository. URL = "github.com/Indra-Labs/indra" // GitRef is the gitref, as in refs/heads/branchname. - GitRef = "refs/heads/ind-bootstrap" + GitRef = "refs/heads/indra-bootstrap" // ParentGitCommit is the commit hash of the parent HEAD. ParentGitCommit = "8c361507bd145da860c9753d1dfb8951223ffc39" // BuildTime stores the time when the current binary was built.