Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mirror images #34

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/mirror/datadog/agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM datadog/agent

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Code Quality Violation

always pin version to an image spec (...read more)

This rule dictates that Docker images should always be tagged with a specific version number. In Docker, an image tag represents a particular version of an image. The use of tags allows developers to have better control over which versions of an image are being used in their projects.

This is crucial because it ensures the consistency and reliability of the Docker environment. If an image is not tagged, Docker defaults to using the 'latest' version of the image. However, the 'latest' tag does not guarantee that the same version of an image will be used every time, which can lead to unexpected behavior or compatibility issues.

To comply with this rule, always specify a version number when pulling a Docker image. Instead of FROM debian, write FROM debian:unstable or FROM debian:10.3. This ensures that you are using a specific version of the image, providing a more predictable and stable environment for your project.

View in Datadog  Leave us feedback  Documentation

1 change: 1 addition & 0 deletions src/mirror/datadog/dd-apm-test-agent/v1.12.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.12.0
1 change: 1 addition & 0 deletions src/mirror/elasticsearch/8.1.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM elasticsearch:8.1.3
1 change: 1 addition & 0 deletions src/mirror/memcached/1.5/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM memcached:1.5-alpine
1 change: 1 addition & 0 deletions src/mirror/mongo/3.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM mongo:3.6
1 change: 1 addition & 0 deletions src/mirror/mysql/8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM mysql:8.0
1 change: 1 addition & 0 deletions src/mirror/opensearchproject/opensearch/2.8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM opensearchproject/opensearch:2.8.0
1 change: 1 addition & 0 deletions src/mirror/postgres/9.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM postgres:9.6
1 change: 1 addition & 0 deletions src/mirror/redis/6.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM redis:6.2
2 changes: 2 additions & 0 deletions src/mirror/starburstdata/presto/332/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# append-tags: e.9
FROM starburstdata/presto:332-e.9
9 changes: 7 additions & 2 deletions tasks/docker.rake
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ namespace :docker do
dockerfile = f
context = File.dirname(dockerfile)

image = "#{repository}/#{File.dirname(f.sub(/^src\//, "").sub(/\/Dockerfile(.*)/, ""))}"
tag = f.sub(/.*\/(\d+(?:\.\d+))+\//, "\\1").sub(/Dockerfile(.*)$/) { |m| m.sub("Dockerfile", "").tr(".", "-") }
if (m = context.match(/\/((?:v?)\d+(?:\.\d+|$)+)$/))
tag = m[1] + File.basename(dockerfile).sub(/Dockerfile(?:.*)$/) { |m| m.sub("Dockerfile", "").tr(".", "-") }
image = "#{repository}/#{File.dirname(context).sub(/^src\//, "")}"
else
tag = "latest"
image = "#{repository}/#{context.sub(/^src\//, "")}".sub(/Dockerfile(?:.*)$/) { |m| m.sub("Dockerfile", "").tr(".", "-") }
end

targets = [
{
Expand Down