Skip to content

Commit 4a7a62a

Browse files
committed
Init
1 parent 2f3decf commit 4a7a62a

File tree

4 files changed

+155
-0
lines changed

4 files changed

+155
-0
lines changed

.github/workflows/docker.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Docker"
2+
3+
on:
4+
workflow_dispatch:
5+
6+
push:
7+
branches: ["master"]
8+
9+
schedule:
10+
- cron: "0 8 * * 1"
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
name: "Build"
18+
uses: dockette/.github/.github/workflows/docker.yml@master
19+
secrets: inherit
20+
with:
21+
image: "dockette/coder"
22+
tag: "fx"
23+
context: "coder/fx"

Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
DOCKER_IMAGE=dockette/coder
2+
DOCKER_TAG?=fx
3+
DOCKER_PLATFORMS?=linux/amd64,linux/arm64
4+
5+
build:
6+
docker buildx build --platform ${DOCKER_PLATFORMS} -t ${DOCKER_IMAGE}:${DOCKER_TAG} fx/
7+
8+
test:
9+
docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} node --version
10+
docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} php --version
11+
docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} composer --version
12+
docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} deno --version
13+
docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} bun --version
14+
docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} gh --version
15+
docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} claude --version
16+
docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} cursor-agent --version
17+
docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} opencode --version
18+
docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} codex --version
19+
docker run --rm ${DOCKER_IMAGE}:${DOCKER_TAG} copilot --version

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<h1 align=center>Dockette / Coder</h1>
2+
3+
<p align=center>
4+
Docker base images for <a href="https://coder.com">Coder</a> workspaces. Extends the official Coder Node image with PHP, Composer, Deno, Bun, GitHub CLI, and dev tooling.
5+
</p>
6+
7+
<p align=center>
8+
<a href="https://hub.docker.com/r/dockette/coder/"><img src="https://badgen.net/docker/pulls/dockette/coder"></a>
9+
<a href="https://bit.ly/ctteg"><img src="https://badgen.net/badge/support/gitter/cyan"></a>
10+
<a href="https://github.com/sponsors/f3l1x"><img src="https://badgen.net/badge/sponsor/donations/F96854"></a>
11+
</p>
12+
13+
-----
14+
15+
## Usage
16+
17+
```
18+
docker run -it dockette/coder:fx
19+
```
20+
21+
**Base image**
22+
23+
```Dockerfile
24+
FROM dockette/coder:fx
25+
26+
USER root
27+
# optional extra layers
28+
USER coder
29+
```
30+
31+
## Documentation
32+
33+
### From base (codercom/example-node:ubuntu)
34+
35+
Ubuntu Noble, Node.js LTS, Yarn, Docker, git, curl, htop, jq, vim, wget, sudo, `coder` user.
36+
37+
### Added in fx
38+
39+
mc, nano, PHP 8.5 (cli, curl, intl, mbstring, readline, xml, zip), Composer, GitHub CLI (gh), Deno, Bun, Claude CLI, OpenCode, and npm globals: vibe-kanban, @openai/codex, @github/copilot.
40+
41+
### Coder template
42+
43+
Use this image in your Terraform template so workspaces start with all tools preinstalled: set `docker_image` / `docker_container` to `dockette/coder:fx`, or use a Dockerfile that starts with `FROM dockette/coder:fx`. Your `startup_script` can be reduced to first-run init (e.g. copy `/etc/skel` into home, touch `~/.init_done`); no need to install packages or run install scripts.
44+
45+
### PATH
46+
47+
Deno and Bun are installed under `/usr/local`. Their env and `bin` dirs are appended to `/etc/profile` so all login shells get `DENO_INSTALL`, `BUN_INSTALL`, and PATH.
48+
49+
## Development
50+
51+
See [how to contribute](https://contributte.org/contributing.html) to this package.
52+
53+
-----
54+
55+
Consider to [support](https://github.com/sponsors/f3l1x) **f3l1x**. Also thank you for using this package.

fx/Dockerfile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
FROM codercom/example-node:ubuntu
2+
3+
USER root
4+
5+
# Apt: mc, nano, PHP 8.5 (Ondrej), GitHub CLI
6+
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && \
7+
apt-get install -y --no-install-recommends mc nano software-properties-common ca-certificates && \
8+
add-apt-repository -y ppa:ondrej/php && \
9+
apt-get update -y && \
10+
apt-get install -y --no-install-recommends \
11+
php8.5-cli php8.5-common php8.5-curl php8.5-intl php8.5-mbstring php8.5-readline php8.5-xml php8.5-zip && \
12+
mkdir -p -m 755 /etc/apt/keyrings && \
13+
(out=$(mktemp) && wget -nv -O"$out" https://cli.github.com/packages/githubcli-archive-keyring.gpg && \
14+
cat "$out" > /etc/apt/keyrings/githubcli-archive-keyring.gpg && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg) && \
15+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list && \
16+
apt-get update -y && \
17+
apt-get install -y --no-install-recommends gh && \
18+
apt-get clean && rm -rf /var/lib/apt/lists/*
19+
20+
# Composer (system-wide)
21+
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
22+
23+
# Deno (system-wide)
24+
ENV DENO_INSTALL=/usr/local
25+
RUN curl -fsSL https://deno.land/install.sh | sh
26+
27+
# Bun (system-wide)
28+
ENV BUN_INSTALL=/usr/local
29+
RUN curl -fsSL https://bun.sh/install | bash
30+
31+
# Claude CLI (install script may use $HOME; we copy binary to /usr/local/bin)
32+
RUN curl -fsSL https://claude.ai/install.sh | bash || true && \
33+
if [ -f /root/.local/bin/claude ]; then cp /root/.local/bin/claude /usr/local/bin/claude && chmod +x /usr/local/bin/claude; fi && \
34+
if [ -f /root/bin/claude ]; then cp /root/bin/claude /usr/local/bin/claude && chmod +x /usr/local/bin/claude; fi
35+
36+
# OpenCode (same: install then ensure binary in PATH)
37+
RUN curl -fsSL https://opencode.ai/install | bash || true && \
38+
if [ -f /root/.local/bin/opencode ]; then cp /root/.local/bin/opencode /usr/local/bin/opencode && chmod +x /usr/local/bin/opencode; fi && \
39+
if [ -f /root/bin/opencode ]; then cp /root/bin/opencode /usr/local/bin/opencode && chmod +x /usr/local/bin/opencode; fi
40+
41+
# Cursor Agent CLI (https://cursor.com/docs/cli)
42+
RUN curl -fsSL https://cursor.com/install | bash || true && \
43+
if [ -f /root/.local/bin/cursor-agent ]; then cp /root/.local/bin/cursor-agent /usr/local/bin/cursor-agent && chmod +x /usr/local/bin/cursor-agent; fi && \
44+
if [ -f /root/bin/cursor-agent ]; then cp /root/bin/cursor-agent /usr/local/bin/cursor-agent && chmod +x /usr/local/bin/cursor-agent; fi
45+
46+
# npm global tools
47+
RUN npm install -g @openai/codex @github/copilot
48+
49+
# PATH and env for all users (Deno, Bun) — append to bash profile
50+
RUN echo '' >> /etc/profile && \
51+
echo '# coder-env: Deno, Bun' >> /etc/profile && \
52+
echo 'export DENO_INSTALL="${DENO_INSTALL:-/usr/local}"' >> /etc/profile && \
53+
echo 'export BUN_INSTALL="${BUN_INSTALL:-/usr/local}"' >> /etc/profile && \
54+
echo '[ -d "$DENO_INSTALL/bin" ] && export PATH="$DENO_INSTALL/bin:$PATH"' >> /etc/profile && \
55+
echo '[ -d "$BUN_INSTALL/bin" ] && export PATH="$BUN_INSTALL/bin:$PATH"' >> /etc/profile
56+
57+
WORKDIR /home/coder
58+
USER coder

0 commit comments

Comments
 (0)