Skip to content

Commit

Permalink
Add sudo to container (#7)
Browse files Browse the repository at this point in the history
* Add sudo and doas

* Finish sudo setup
  • Loading branch information
AngelOnFira authored Oct 30, 2023
1 parent b24cdcd commit c54947c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y \
make \
g++ \
wget \
sudo \
&& rm -rf /var/lib/apt/lists/*

# Create a non-root user
Expand Down
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,22 @@ make
This method is useful when you need to run multiple commands or want to explore
the file system within the Docker container.

#### Sudo Access

The Docker image has sudo installed, and the default user (`milkv`) has sudo
access. The reason that this container isn't using the `root` user by default is
that anything produced by the container into the current directory will be owned
by `root` and not the user that ran the container. This would include the final
binary, and any intermediate files.

You might need to use sudo to install additional packages or run certain tools
within the container. To use sudo, run the following command:

```bash
# Use the password "milkv"
sudo <command>
```

## Copying Binaries to the Milk-V Duo

The Milk-V Duo runs on Busybox Linux, which has many simpler and/or older
Expand Down Expand Up @@ -103,10 +119,11 @@ To build the Docker image, use the following command:
docker build -t ghcr.io/aidancrowther/milk-v-duo-docker-compile .
```

In this command, `ghcr.io/aidancrowther/milk-v-duo-docker-compile` is the tag for the
Docker image. The tag is a label for your image so that it can be referenced.
This tag is used in subsequent commands (like `docker run`). By using this tag,
you don't need to change any of the other commands in this README.
In this command, `ghcr.io/aidancrowther/milk-v-duo-docker-compile` is the tag
for the Docker image. The tag is a label for your image so that it can be
referenced. This tag is used in subsequent commands (like `docker run`). By
using this tag, you don't need to change any of the other commands in this
README.

## Using GitHub Codespaces

Expand Down

0 comments on commit c54947c

Please sign in to comment.