Skip to content

Commit

Permalink
change uids for user rw in the container
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Oct 11, 2024
1 parent 21939b2 commit fe711b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ sudo apt update && sudo apt install snapd
# Install Go (Snap)
sudo snap install go --channel=1.23/stable --classic

# Clean module cache
go clean -modcache

# Install Base
sudo apt install make gcc git jq wget

Expand Down Expand Up @@ -80,9 +77,6 @@ gh auth login
# Golang
brew install go

# Clean module cache
go clean -modcache

# Docker
brew install --cask docker
open -a Docker # start docker desktop
Expand Down Expand Up @@ -110,9 +104,6 @@ GO_VERSION=1.23.0
wget https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go$GO_VERSION.linux-amd64.tar.gz

# Clean module cache
go clean -modcache

# Docker
sudo apt -y install docker.io

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ spawn module new nameservice

go clean -modcache

go mod tidy
# converts proto to go
make proto-gen
```

This creates a new template module with the name `nameservice` in the `x` and `proto` directories. It also automatically connected to your application and is ready for use.
5 changes: 4 additions & 1 deletion simapp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,12 @@ mod-tidy:
###############################################################################
### Protobuf ###
###############################################################################
CURRENT_UID := $(shell id -u)
CURRENT_GID := $(shell id -g)

protoVer=0.13.2
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace:rw --user ${CURRENT_UID}:${CURRENT_GID} --workdir /workspace $(protoImageName)

proto-all: proto-format proto-lint proto-gen format

Expand Down

0 comments on commit fe711b1

Please sign in to comment.