Skip to content

Commit

Permalink
feat(redisdev): add redisdev image
Browse files Browse the repository at this point in the history
  • Loading branch information
johnitvn committed Nov 25, 2024
1 parent 3e2d8fc commit ef4826e
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 1 deletion.
17 changes: 17 additions & 0 deletions images/redisdev/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM rediscommander/redis-commander:latest as redis-commander

FROM redis:bookworm

RUN apt-get update && apt-get install -y curl \
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*

COPY --from=redis-commander /redis-commander /redis-commander
COPY images/redisdev/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

EXPOSE 6379 8081

ENTRYPOINT ["/entrypoint.sh"]
CMD [ "sleep", "infinity" ]
13 changes: 13 additions & 0 deletions images/redisdev/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

redis-server &

node /redis-commander/bin/redis-commander.js --redis-host 127.0.0.1 --redis-label local --port 8081 &

until curl -s http://localhost:8081; do
sleep 2
done

exec "$@"


51 changes: 51 additions & 0 deletions images/redisdev/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "redisdev",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"metadata": {
"version": "1.0.0",
"registries": [
"ghcr.io",
"docker.io"
],
"namespace": "ebizbase/redisdev",
"labels": {
"org.opencontainers.image.source": "https://github.com/ebizbase/dev-infras",
"org.opencontainers.image.description": "Redis development image with redis and redis-commander",
"org.opencontainers.image.licenses": "MIT"
}
},
"tags": [],
"targets": {
"build": {
"executor": "@ebizbase/nx-docker:build",
"options": {
"load": true,
"tags": [
"edge"
]
}
},
"test": {
"dependsOn": [
"build"
],
"executor": "nx:run-commands",
"options": {
"command": "docker run --rm -p 8081:8081 ebizbase/redisdev:edge curl -s localhost:8081"
}
},
"publish": {
"executor": "@ebizbase/nx-docker:build",
"options": {
"push": true,
"tags": [
"latest",
"{major}",
"{major}.{minor}",
"{major}.{minor}.{patch}"
]
}
}
}
}
10 changes: 10 additions & 0 deletions release-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@
"jsonpath": "$.metadata.version"
}
]
},
"images/redisdev": {
"package-name": "redisdev",
"extra-files": [
{
"type": "json",
"path": "project.json",
"jsonpath": "$.metadata.version"
}
]
}
}
}
3 changes: 2 additions & 1 deletion release-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"devcontainer-images/node-playwright-devcontainer": "1.0.0",
"images/node-distroless": "1.0.0",
"images/nginx-spa": "1.0.0",
"images/mongodev": "1.0.0"
"images/mongodev": "1.0.0",
"images/redisdev": "1.0.0"
}

0 comments on commit ef4826e

Please sign in to comment.