Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Updated user in dockerfile (#1012)" from main #1021

Merged
merged 1 commit into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,4 @@ RUN PATH="/usr/local/go/bin:${PATH}" \
FROM alpine:latest
RUN apk add --update bash
COPY --from=builder /usr/local/bin/razor /usr/local/bin/
RUN set -x \
&& adduser -u 82 -D -S razor
USER razor
ENTRYPOINT [ "razor" ]
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,9 @@ razor -v
## Docker quick start

One of the quickest ways to get `razor-go` up and running on your machine is by using Docker:

1. Create user
```
useradd -u 82 razor
```
2. Start the container
```
docker run -d -it --entrypoint /bin/sh --name razor-go -v "$(echo $HOME)"/.razor:/home/razor/.razor razornetwork/razor-go:v1.0.1-incentivised-testnet-phase2
```
3. Update the owner of `.razor` directory
```
chown razor:razor $HOME/.razor
```
```
docker run -d -it--entrypoint /bin/sh --name razor-go -v "$(echo $HOME)"/.razor:/root/.razor razornetwork/razor-go:v1.0.1-incentivised-testnet-phase2
```

>**_NOTE:_** that we are leveraging docker bind-mounts to mount `.razor` directory so that we have a shared mount of `.razor` directory between the host and the container. The `.razor` directory holds keys to the addresses that we use in `razor-go`, along with logs and config. We do this to persist data in the host machine, otherwise you would lose your keys once you delete the container.

Expand Down