Skip to content

Commit

Permalink
feat(coder): add minimal image
Browse files Browse the repository at this point in the history
  • Loading branch information
tuana9a committed Sep 11, 2024
1 parent d59e98a commit 3b111ba
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/502-docker-build-push-coder-minimal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: build-push-coder-minimal

on:
workflow_dispatch:
pull_request:
paths:
- "docker/coder/minimal.Dockerfile"

jobs:
build-and-push:
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: tuana9a
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: docker/coder
file: docker/coder/minimal.Dockerfile
push: true
tags: tuana9a/coder:minimal
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Send Telegram message
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: |
MESSAGE="OK build tuana9a/coder:minimal"
curl -s -X POST https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage -d chat_id=${TELEGRAM_CHAT_ID} -d text="${MESSAGE}"
2 changes: 1 addition & 1 deletion docker/coder/base.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM codercom/enterprise-base:ubuntu
FROM codercom/enterprise-base:ubuntu-20240909

USER coder

Expand Down
5 changes: 5 additions & 0 deletions docker/coder/minimal.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM codercom/enterprise-minimal:ubuntu-20240909

USER coder

RUN sudo apt update -y && sudo apt install -y tmux direnv jq dnsutils net-tools iputils-ping telnet zsh && sudo usermod -s /bin/zsh coder

0 comments on commit 3b111ba

Please sign in to comment.