import { List } from 'lucide-react'; import { joinCommand } from '@/docker/filters/utils'; import { getPairKey, getPairValue } from '@/portainer/filters/filters'; import { TableContainer, TableTitle } from '@@/datatables'; import { DetailsTable } from '@@/DetailsTable'; interface DockerImage { Command: Array; Entrypoint: Array; ExposedPorts: Array; Volumes: Array; Env: Array; } interface Props { image: DockerImage; } export function DockerfileDetails({ image }: Props) { return ( {joinCommand(image.Command)} {image.Entrypoint && ( {joinCommand(image.Entrypoint)} )} {image.ExposedPorts.length > 0 && ( {image.ExposedPorts.map((port, index) => ( {port} ))} )} {image.Volumes.length > 0 && (
{image.Volumes.map((volume, index) => ( {volume} ))}
)} {image.Env.length > 0 && ( {image.Env.map((variable) => ( ))}
{getPairKey(variable, '=')} {getPairValue(variable, '=')}
)}
); }