You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>`
14
16
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.
15
17
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
+
16
28
### With a "Volume"
29
+
17
30
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:
18
31
19
32
```shell
@@ -23,6 +36,10 @@ cd ~/<user>/some/dir
23
36
docker run -it -v .:/app alp_v3_20-ruby_3_3_3:v1
24
37
```
25
38
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
0 commit comments