Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions build/dockerfiles/assembly.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FROM linux-libc-ubi9 as linux-libc-ubi9-content
FROM linux-musl as linux-musl-content

# https://quay.io/eclipse/che-machine-exec#^7\.
FROM quay.io/eclipse/che-machine-exec:7.56.0 as machine-exec
FROM quay.io/vrubezhny/che-machine-exec:PR-376 as machine-exec

# https://registry.access.redhat.com/ubi8/ubi
FROM registry.access.redhat.com/ubi8/ubi:8.10 AS ubi-builder
Expand All @@ -26,16 +26,18 @@ COPY --from=linux-musl-content --chown=0:0 /checode-linux-musl /mnt/rootfs/checo
COPY --from=linux-libc-ubi8-content --chown=0:0 /checode-linux-libc/ubi8 /mnt/rootfs/checode-linux-libc/ubi8
COPY --from=linux-libc-ubi9-content --chown=0:0 /checode-linux-libc/ubi9 /mnt/rootfs/checode-linux-libc/ubi9

RUN mkdir -p /mnt/rootfs/projects && mkdir -p /mnt/rootfs/home/che && mkdir -p /mnt/rootfs/bin/
RUN mkdir -p /mnt/rootfs/projects && mkdir -p /mnt/rootfs/home/che
RUN cat /mnt/rootfs/etc/passwd | sed s#root:x.*#root:x:\${USER_ID}:\${GROUP_ID}::\${HOME}:/bin/bash#g > /mnt/rootfs/home/che/.passwd.template \
&& cat /mnt/rootfs/etc/group | sed s#root:x:0:#root:x:0:0,\${USER_ID}:#g > /mnt/rootfs/home/che/.group.template
RUN for f in "/mnt/rootfs/bin/" "/mnt/rootfs/home/che" "/mnt/rootfs/etc/group" "/mnt/rootfs/projects" ; do\
RUN for f in "/mnt/rootfs/home/che" "/mnt/rootfs/etc/group" "/mnt/rootfs/projects" ; do\
chgrp -R 0 ${f} && \
chmod -R g+rwX ${f}; \
done
RUN chmod -R g-w /mnt/rootfs/etc/passwd

COPY --from=machine-exec --chown=0:0 /go/bin/che-machine-exec /mnt/rootfs/bin/machine-exec
COPY --from=machine-exec --chown=0:0 /go/ubi8/bin/che-machine-exec /mnt/rootfs/checode-linux-libc/ubi8/machine-exec
COPY --from=machine-exec --chown=0:0 /go/ubi9/bin/che-machine-exec /mnt/rootfs/checode-linux-libc/ubi9/machine-exec
COPY --from=machine-exec --chown=0:0 /go/bin/che-machine-exec /mnt/rootfs/checode-linux-musl/machine-exec
COPY --chmod=755 /build/scripts/*.sh /mnt/rootfs/
COPY --chmod=755 /build/remote-config /mnt/rootfs/remote/data/Machine/

Expand Down
3 changes: 0 additions & 3 deletions build/scripts/entrypoint-init-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@

# Copy checode stuff to the shared volume
cp -r /checode-* /checode/
# Copy machine-exec as well
mkdir -p /checode/bin
cp /bin/machine-exec /checode/bin/
# Copy entrypoint
cp /entrypoint-volume.sh /checode/
# Copy remote configuration
Expand Down
8 changes: 4 additions & 4 deletions build/scripts/entrypoint-volume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ fi
# list checode
ls -la /checode/

# Start the machine-exec component in background
export MACHINE_EXEC_PORT=3333
nohup /checode/bin/machine-exec --url "127.0.0.1:${MACHINE_EXEC_PORT}" &

runtime_ld_library_path=""

# detect if we're using alpine/musl (avoid grep dependency for micro images)
Expand Down Expand Up @@ -126,6 +122,10 @@ export VSCODE_AGENT_FOLDER=/checode/remote
# Supported values: all | none | shellEnv | terminal
export LD_SANITIZE_SCOPE="${LD_SANITIZE_SCOPE:-terminal}"

# Start the machine-exec component in background
export MACHINE_EXEC_PORT=3333
nohup ./machine-exec --url "127.0.0.1:${MACHINE_EXEC_PORT}" &

if [ -z "$VSCODE_NODEJS_RUNTIME_DIR" ]; then
export VSCODE_NODEJS_RUNTIME_DIR="$(pwd)"
fi
Expand Down