add ubuntu-full image
This commit is contained in:
commit
b45b165f71
2 changed files with 82 additions and 0 deletions
42
ubuntu-full/Taskfile.yml
Normal file
42
ubuntu-full/Taskfile.yml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
version: '3'
|
||||
vars:
|
||||
REGISTRY: git.juancwu.dev
|
||||
OWNER: juancwu
|
||||
IMAGE_NAME: ubuntu-24.04
|
||||
VERSION: latest
|
||||
FULL_IMAGE: "{{.REGISTRY}}/{{.OWNER}}/{{.IMAGE_NAME}}:{{.VERSION}}"
|
||||
tasks:
|
||||
default:
|
||||
desc: "Builds the image"
|
||||
cmds:
|
||||
- task: build
|
||||
login:
|
||||
desc: "Login to the private registry (interactive)"
|
||||
cmds:
|
||||
- echo "Logging into {{.REGISTRY}}..."
|
||||
- docker login {{.REGISTRY}}
|
||||
build:
|
||||
desc: "Build the Docker image locally"
|
||||
cmds:
|
||||
- echo "Building {{.FULL_IMAGE}}..."
|
||||
- docker build -t {{.FULL_IMAGE}} .
|
||||
push:
|
||||
desc: "Build and push the image to the registry"
|
||||
deps: [build]
|
||||
cmds:
|
||||
- echo "Pushing to registry..."
|
||||
- docker push {{.FULL_IMAGE}}
|
||||
test:
|
||||
desc: "Run a quick sanity check on the built image"
|
||||
deps: [build]
|
||||
cmds:
|
||||
- echo "Testing Go version..."
|
||||
- docker run --rm {{.FULL_IMAGE}} go version
|
||||
- echo "Testing Tailwind CLI..."
|
||||
- docker run --rm {{.FULL_IMAGE}} tailwindcss --help
|
||||
- echo "Testing Node version..."
|
||||
- docker run --rm {{.FULL_IMAGE}} node -v
|
||||
clean:
|
||||
desc: "Remove the local docker image to free space"
|
||||
cmds:
|
||||
- docker rmi {{.FULL_IMAGE}} || true
|
||||
Loading…
Add table
Add a link
Reference in a new issue