Skip to content

Commit 5e25d22

Browse files
committed
Updates the README
1 parent 8682e43 commit 5e25d22

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
11
# Alpine Linux Ruby Environment
22

33
## Purpose:
4+
45
1. Practice using Docker (or Containerization, in general) through the incremental evolution of this Environment.
56
2. Test and experiment with the Ruby language and features within this container that can easily be setup anywhere
67

78
## Usage:
8-
1. Install Docker
9+
10+
1. [Install Docker](https://docs.docker.com/engine/install/) (if haven't already)
911
1. Clone this repo
1012
1. `cd` into this repo directory
1113
1. Build the image `docker build . -t alp_v3_20-ruby_3_3_3:v1`. You can tag it however you'd like. An explanation of this command:
12-
1. `docker build .` - The `.` means from "here", meaning, from our current directory (assuming you `cd` into this repo and are using its `Dockerfile`)
13-
1. `-t <name:tag>`
14+
1. `docker build .` - The `.` means from "here", meaning, from our current directory (assuming you `cd` into this repo and are using its `Dockerfile`)
15+
1. `-t <name:tag>`
1416
1. You can then run it interactively `docker run -it alp_v3_20-ruby_3_3_3:v1`; it'll start, launch a shell, and you'll be _inside_ the container, able to execute Ruby commands.
1517

18+
### No Gemfile?
19+
20+
The assumption is that you'll use this base image as the "box" for another code or set of Ruby files, however, you are free to add a `Gemfile` to this repo, `bundle install`, and add any code you wish. Originally, I had:
21+
22+
- a Ruby file
23+
- a test for that Ruby file
24+
- `gem "minitest"
25+
26+
If you follow that pattern, you should be able to run some Ruby code and any MiniTest assertions!
27+
1628
### With a "Volume"
29+
1730
If you'd like to use this container to run code that is local to your machine, you can do so by adding the `-v` flag. It's easier if you navigate to the location of the Ruby code you'd like to run, but not necessary. Here's an example:
1831

1932
```shell
@@ -23,6 +36,10 @@ cd ~/<user>/some/dir
2336
docker run -it -v .:/app alp_v3_20-ruby_3_3_3:v1
2437
```
2538

26-
You should be able to run some Ruby code and any MiniTest assertions!
39+
## DockerHub
40+
41+
This has been [published to DockerHub](https://hub.docker.com/repository/docker/ballenacuadrada/alpine3_20/general). There are several versions, but the key one is the `-multiplatform` version that can be used on either ARM or x86.
42+
43+
I don't know how much I'll add to or modify these, however, the details in this README serve as notes for future Docker work
2744

2845
Enjoy!

0 commit comments

Comments
 (0)