Closed pataquets closed 7 years ago
Fancy to create an 'official' Docker Hub Automated Build image? See OP. An AB on Docker Hub under the same account name than the Gh repo would provide a hands-free distribution/packaging method at each commit without additional work. It's an easy & quick, one-time setup.
@SaminOz ping?
@SaminOz : ping?
@https://github.com/pataquets : pong :)
On 19 October 2017 at 00:00, Alfonso Montero notifications@github.com wrote:
@SaminOz https://github.com/saminoz : ping?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SaminOz/redis-random-data-generator/pull/6#issuecomment-337752139, or mute the thread https://github.com/notifications/unsubscribe-auth/AD7V1O3oqlEvbS0aVj1A5UShniaHissVks5stoMegaJpZM4LfxOd .
--
Sam Moore
Add Dockerfile to enable image building. Using the official nodejs image. More info at https://hub.docker.com/_/node/ Allowed me to work on this software without any NodeJS setup on my Linux dev box.
Since it's not possible to specify the target Redis server other than config file (eg, command-line or env var), I've resorted to replace
127.0.0.1
byredis
as the default Redis server in the included config file for the image, since neitherlocalhost
nor127.0.0.1
would work from inside a container.As of now, you can either:
--link
or--add-host
at container launch (linked hostname should beredis
)config.json
file from the Docker host via-v
option (Using linked container as demo method below)Build:
Run a Redis server to use it later for testing (exposing Redis port
-p
is not required):From another terminal, launch a container from the above built image:
FYI, there's a still quicker to test, already built image on my Docker Hub. Test it by running:
Notice I'm using the
--rm
(remove container on finish) and interactive mode (-it
) Docker launch flags. Stop containers byCTRL+C
'ing them.Optional improvement to come: