https://github.com/naughty-ghost/dev-docker-image
docker iamges for develop
https://github.com/naughty-ghost/dev-docker-image
aws-cli dockerfile terraform
Last synced: 6 days ago
JSON representation
docker iamges for develop
- Host: GitHub
- URL: https://github.com/naughty-ghost/dev-docker-image
- Owner: naughty-ghost
- Created: 2023-01-02T04:49:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-04-25T13:14:39.000Z (2 months ago)
- Last Synced: 2026-04-25T13:29:43.885Z (2 months ago)
- Topics: aws-cli, dockerfile, terraform
- Language: Dockerfile
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
開発用イメージを管理しています。mainブランチにpushしたときにgithub actionが実行されます。
# 追加方法
イメージごとのディレクトリを作成します。最低限DockerfileとCHANGELOG.mdが必要になります。
次にworkflowsにactions用のymlファイルを使用します。
## Dockerfile
省略
## CHANGELOG.md
[https://keepachangelog.com/en/1.0.0/](https://keepachangelog.com/en/1.0.0/)にしたがって記述します。
以下に例を示します。
```
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.1.0] - 2023-01-02
### Added
- {actions} 開発用イメージ。
```
## docker-{actions}.yml
{actions}の部分は追加したデイレクトリと合わせてください。
```
name: docker.{actions}
on:
push:
branches:
- main
paths:
- .github/workflows/docker-{actions}.yml
- {actions}/**
env:
# Format
REGISTRY: ghcr.io
REPOSITORY: ${{ github.repository }}
IMAGE: {actions}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
defaults:
run:
working-directory: {actions}
steps:
- name: Checkout repository
uses: actions/checkout@v6
# https://github.com/docker/setup-buildx-action
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v4
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Download release tool
run: |
wget -q https://github.com/naughty-ghost/release-tool/releases/download/v2.0.0/release-tool.zip -O release-tool.zip
unzip release-tool.zip
- name: Extract Docker metadata
id: meta
run: |
echo "tag=ghcr.io/$REPOSITORY-$IMAGE:$(./release-tool | tr -d '\n')" >> $GITHUB_OUTPUT
{
echo "description<> $GITHUB_OUTPUT
- name: Build and push Docker image
env:
DESCRIPTION: ${{ steps.meta.outputs.description }}
run: |
docker buildx create --use
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag ${{ steps.meta.outputs.tag }} \
--annotation "index:org.opencontainers.image.description=${DESCRIPTION}" \
--push .
```