mirror of
https://github.com/tiennm99/composes.git
synced 2026-10-13 18:15:28 +00:00
feat(code-server): join the Docker socket's group at startup and add build tools
Add an entrypoint wrapper that reads the socket's GID, adds coder to a matching group and re-execs the image's entrypoint under it, so docker works without sudo on any host. Install build-essential and the headers rbenv needs to build Ruby, and make zsh the login shell. Document home installs for rbenv, Docker Compose and Buildx plugins, and jq.
This commit is contained in:
1 parent
56b1c5f931
commit
4c37d45377
3 files changed
+115
-12
No files matched your search
+10
-1
@@ -4,10 +4,19 @@ USER root
|
||||
|
||||
# Extra system packages.
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends bubblewrap unzip zip \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
build-essential bubblewrap unzip zip \
|
||||
libffi-dev libssl-dev libyaml-dev zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# zsh as the container user's login shell.
|
||||
RUN chsh -s /usr/bin/zsh coder
|
||||
|
||||
# Workspace directory, owned by the container user.
|
||||
RUN mkdir -p /workspace && chown 1000:1000 /workspace
|
||||
|
||||
# Startup wrapper: joins the Docker socket's group, then runs the image's entrypoint.
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
USER 1000
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."]
|
||||
Reference in new issue
Block a user