multi-stage-dockerfile
Create optimized multi-stage Dockerfiles for any language or framework
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Create optimized multi-stage Dockerfiles for any language or framework
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
A skill to handle the last user input.
Run pgTAP SQL tests using the repository wrapper. Use when asked to "run pgtap tests", "execute db tests", "run tests for migration test-NNN-*.sql", or "run pg_prove on tests directory". Works together with the create-migration skill to execute the exhaustive tests authored for a migration.
Manage Phinx DB migrations up and down. Use when asked to "run phinx migrate", "rollback last migration", "check migration status", "apply one migration", or "run phinx with --count=1", "migrate up", "migrate down". Works together with the create-migration skill for creating migration files and with the pgtap skill for running tests.
Create Phinx PHP database migrations with exhaustive pgTAP SQL test suites for the GeoKrety website database. Use when asked to "create a migration", "create a phinx migration", "create a phinx migration with tests", "add a database migration", "add a column", "create a table", "add a trigger", "create a database change", "write db migration tests", or any variant of database schema evolution tasks. Generates migration files following existing patterns, validates PHP syntax, creates comprehensive pgTAP tests targeting ~100% coverage and edge cases, then runs a DBA + critical-thinking review loop before applying. Works together with the phinx and pgtap skills.
Guide users through creating high-quality GitHub Copilot prompts with proper structure, tools, and best practices.
An expert in the GeoKrety system, including its database schema, analytics, and operational practices. This skill can answer questions about the system, help with database queries, and provide insights into the data and its structure.
| name | multi-stage-dockerfile |
| description | Create optimized multi-stage Dockerfiles for any language or framework |
Your goal is to help me create efficient multi-stage Dockerfiles that follow best practices, resulting in smaller, more secure container images.
AS keyword (e.g., FROM node:18 AS builder)python:3.11-slim not just python).dockerignore to prevent unnecessary files from being included in the build context&& to reduce layer countUSER instruction to specify a non-root userDocker Bake is a high-level build definition language that simplifies building complex multi-platform images with multiple targets. Use docker-bake.hcl for:
# docker-bake.hcl
group "default" {
targets = ["app"]
}
target "app" {
dockerfile = "Dockerfile"
platforms = ["linux/amd64", "linux/arm64"]
args = {
NODE_ENV = "production"
}
tags = [
"geokrety/myapp:latest",
"geokrety/myapp:${VERSION}"
]
output = ["type=registry"]
}
Development vs Production Builds:
target "dev" {
dockerfile = "Dockerfile"
tags = ["geokrety/myapp:dev"]
cache-from = ["type=local,src=.docker-cache"]
cache-to = ["type=local,dest=.docker-cache"]
}
target "prod" {
inherits = ["dev"]
dockerfile = "Dockerfile.prod"
tags = ["geokrety/myapp:latest"]
output = ["type=registry"]
}
Multi-Platform Builds:
target "app" {
platforms = [
"linux/amd64",
"linux/arm64",
"linux/arm/v7"
]
output = ["type=oci,dest=./output"]
}
Using Build Arguments:
variable "VERSION" {
default = "latest"
}
target "app" {
args = {
BUILD_VERSION = VERSION
BUILD_DATE = timestamp()
}
}
# Build default target (requires group "default")
docker buildx bake
# Build specific target
docker buildx bake app
# Build multiple targets
docker buildx bake app database
# Build with variable override
docker buildx bake --set app.args.version=1.2.3
# Build all platforms and push to registry
docker buildx bake app --push
# Build and load locally (single platform only)
docker buildx bake app --load
cache-from and cache-to for faster rebuilds locally and in CI/CDsource attribute to reference external Dockerfile sourcesdocker/bake-action