Initial commit
This commit is contained in:
commit
c3e9e2b40b
4 changed files with 129 additions and 0 deletions
31
Dockerfile
Normal file
31
Dockerfile
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
FROM archlinux:latest
|
||||
|
||||
# Build args for user
|
||||
ARG USERNAME=dev
|
||||
ARG UID=1000
|
||||
ARG GID=1000
|
||||
|
||||
# Install basic tools
|
||||
RUN pacman -Syu --noconfirm \
|
||||
git \
|
||||
ca-certificates \
|
||||
curl \
|
||||
bash \
|
||||
&& pacman -Scc --noconfirm
|
||||
|
||||
# Create user
|
||||
RUN groupadd -g ${GID} ${USERNAME} && \
|
||||
useradd -m -u ${UID} -g ${GID} -s /bin/bash ${USERNAME}
|
||||
|
||||
# Switch to non-root user
|
||||
USER ${USERNAME}
|
||||
WORKDIR /home/${USERNAME}
|
||||
|
||||
# Install OpenCode CLI via official installer
|
||||
RUN curl -fsSL https://opencode.ai/install | bash
|
||||
|
||||
# Add OpenCode CLI to PATH
|
||||
ENV PATH="/home/${USERNAME}/.opencode/bin:${PATH}"
|
||||
|
||||
# Default working directory
|
||||
WORKDIR /home/${USERNAME}
|
||||
Loading…
Add table
Add a link
Reference in a new issue