Skip to content

Commit 4b752dd

Browse files
committed
chore(pack-images): move sudo to build image
1 parent 01fc804 commit 4b752dd

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

Dockerfile.run

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ ENV CNB_APP_DIR /workspace
1010

1111
RUN groupadd drycc --gid ${CNB_USER_ID} \
1212
&& useradd drycc -u ${CNB_USER_ID} -g ${CNB_GROUP_ID} -s /bin/bash -m \
13-
&& chown ${CNB_USER_ID}:${CNB_GROUP_ID} /opt /etc/ld.so.conf.d \
14-
&& install-packages sudo \
15-
&& echo "drycc ALL=(root) NOPASSWD:/usr/sbin/ldconfig" > /etc/sudoers.d/drycc
13+
&& chown -R ${CNB_USER_ID}:${CNB_GROUP_ID} /opt /etc
1614

1715
USER ${CNB_USER_ID}:${CNB_GROUP_ID}
1816

rootfs/usr/local/bin/generate-layers.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ${deps_layer_dir}/lib/$(uname -m)-linux-gnu
2929
${deps_layer_dir}/usr/lib
3030
${deps_layer_dir}/usr/lib/$(uname -m)-linux-gnu
3131
EOL
32-
sudo ldconfig
32+
ldconfig
3333
}
3434

3535
_create_deps_metadata() {
@@ -64,7 +64,7 @@ generate_base_layer() {
6464
rm -rf /opt/drycc
6565
ln -s "${layers_dir}" /opt/drycc
6666
echo "include ${layers_dir}/*/etc/ld.so.conf.d/*.conf" > /etc/ld.so.conf.d/drycc.conf
67-
sudo ldconfig
67+
ldconfig
6868
EOL
6969
bash "${BASE_LAYER}/profile.d/link.sh"
7070
cat > "${BASE_LAYER}.toml" <<EOL

0 commit comments

Comments
 (0)