Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit496beae

Browse files
authored
Revert "feat(dogfood): install nix package manager (#5308)" (#5871)
1 parentbfc8a10 commit496beae

File tree

2 files changed

+1
-61
lines changed

2 files changed

+1
-61
lines changed

‎dogfood/Dockerfile

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -316,24 +316,7 @@ COPY --from=go /tmp/bin /usr/local/bin
316316
COPY --from=rust-utils /tmp/bin /usr/local/bin
317317
COPY --from=proto /tmp/bin /usr/local/bin
318318

319-
# Configure Nix without sandboxing
320-
# - https://github.com/NixOS/nix/issues/2636#issuecomment-455302745
321-
# - https://nixos.org/manual/nix/stable/installation/multi-user.html#setting-up-the-build-users
322-
RUN addgroup --system nixbld \
323-
&& adduser coder nixbld \
324-
&& for i in $(seq 1 30); do useradd -ms /bin/bash nixbld$i && adduser nixbld$i nixbld; done \
325-
&& mkdir -m 0755 /nix && chown coder:coder /nix \
326-
&& mkdir -p /etc/nix && echo'sandbox = false' > /etc/nix/nix.conf
327-
328-
# Install Nix
329-
ARG NIX_VERSION=2.3.15
330-
RUN cd /opt \
331-
&& curl --silent --show-error --location \
332-
"https://releases.nixos.org/nix/nix-${NIX_VERSION}/nix-${NIX_VERSION}-x86_64-linux.tar.xz" \
333-
-o"nix-${NIX_VERSION}-x86_64-linux.tar.xz" \
334-
&& tar -xf"nix-${NIX_VERSION}-x86_64-linux.tar.xz" \
335-
&& ln -s"nix-${NIX_VERSION}-x86_64-linux" nix \
336-
&& rm -rf"nix-${NIX_VERSION}-x86_64-linux.tar.xz"
319+
USER coder
337320

338321
# Ensure go bins are in the 'coder' user's path. Note that no go bins are
339322
# installed in this docker file, as they'd be mounted over by the persistent
@@ -349,5 +332,3 @@ ENV GOPRIVATE="coder.com,cdr.dev,go.coder.com,github.com/cdr,github.com/coder"
349332

350333
# Increase memory allocation to NodeJS
351334
ENV NODE_OPTIONS="--max-old-space-size=8192"
352-
353-
USER coder

‎dogfood/main.tf

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,10 @@ resource "coder_agent" "dev" {
6363
startup_script=<<EOF
6464
#!/bin/sh
6565
set -x
66-
6766
# install and start code-server
6867
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3
6968
code-server --auth none --port 13337 &
70-
7169
sudo service docker start
72-
73-
# Install Nix into our bash profile so `nix-shell`, `nix-build, and `nix` are available
74-
bash /opt/nix/install --no-daemon
75-
if ! grep -q '. ~/.nix-profile/etc/profile.d/nix.sh' ~/.bashrc; then
76-
echo '. ~/.nix-profile/etc/profile.d/nix.sh' >> ~/.bashrc
77-
fi
78-
7970
DOTFILES_URI=${var.dotfiles_uri}
8071
rm -f ~/.personalize.log
8172
if [ -n "$DOTFILES_URI" ]; then
@@ -132,33 +123,6 @@ resource "docker_volume" "home_volume" {
132123
}
133124
}
134125

135-
resource"docker_volume""nix_volume" {
136-
name="coder-${data.coder_workspace.me.id}-nix"
137-
# Protect the volume from being deleted due to changes in attributes.
138-
lifecycle {
139-
ignore_changes=all
140-
}
141-
# Add labels in Docker to keep track of orphan resources.
142-
labels {
143-
label="coder.owner"
144-
value=data.coder_workspace.me.owner
145-
}
146-
labels {
147-
label="coder.owner_id"
148-
value=data.coder_workspace.me.owner_id
149-
}
150-
labels {
151-
label="coder.workspace_id"
152-
value=data.coder_workspace.me.id
153-
}
154-
# This field becomes outdated if the workspace is renamed but can
155-
# be useful for debugging or cleaning out dangling volumes.
156-
labels {
157-
label="coder.workspace_name_at_creation"
158-
value=data.coder_workspace.me.name
159-
}
160-
}
161-
162126
resource"coder_metadata""home_info" {
163127
resource_id=docker_volume.home_volume.id
164128
item {
@@ -210,11 +174,6 @@ resource "docker_container" "workspace" {
210174
volume_name=docker_volume.home_volume.name
211175
read_only=false
212176
}
213-
volumes {
214-
container_path="/nix"
215-
volume_name=docker_volume.nix_volume.name
216-
read_only=false
217-
}
218177
# Add labels in Docker to keep track of orphan resources.
219178
labels {
220179
label="coder.owner"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp