-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Improved performance when printing logs in Output Channel
- Loading branch information
Showing
14 changed files
with
532 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
.vscode-test/** | ||
out/test/** | ||
test/** | ||
ci/** | ||
src/** | ||
**/*.map | ||
.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
FROM registry.access.redhat.com/ubi8/ubi:8.5-236.1648460182 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN groupadd --gid 1000 builduser \ | ||
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser \ | ||
&& mkdir -p /setup | ||
|
||
# Set up TEMP directory | ||
ENV TEMP=/tmp | ||
RUN chmod a+rwx /tmp | ||
|
||
# Install packages needed to run vscode headless | ||
RUN yum update -q && yum install -y \ | ||
yum-utils \ | ||
git \ | ||
iproute \ | ||
fuse\ | ||
vim \ | ||
gdk-pixbuf2 \ | ||
glibc-devel \ | ||
gtk3\ | ||
alsa-lib\ | ||
libsecret \ | ||
openssl-devel \ | ||
libX11-devel \ | ||
libXScrnSaver \ | ||
mesa-libgbm\ | ||
nss\ | ||
at-spi2-atk\ | ||
libX11-xcb \ | ||
lsof \ | ||
python3-pip \ | ||
sudo \ | ||
wget \ | ||
unzip | ||
|
||
# Add centos8 to mirrorlist | ||
RUN yum-config-manager --add-repo https://vault.centos.org/centos/8/AppStream/x86_64/os | ||
|
||
# Downloand and import CentOS8 GPG keys | ||
RUN wget "https://centos.org/keys/RPM-GPG-KEY-CentOS-Official" \ | ||
&& rpm --import RPM-GPG-KEY-CentOS-Official | ||
|
||
# No Sudo Prompt | ||
RUN echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-builduser \ | ||
&& echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep | ||
|
||
# Install Xvfb | ||
RUN yum install xorg-x11-server-Xvfb -y | ||
|
||
# Node | ||
RUN curl -sL https://rpm.nodesource.com/setup_14.x | bash - | ||
RUN yum install -y nodejs | ||
|
||
# Set python3 as default | ||
RUN alternatives --set python /usr/bin/python3 | ||
|
||
# Setup dbus path and config | ||
RUN rm -rf /var/run/dbus && mkdir -p /var/run/dbus | ||
COPY ci/dbus-policy.conf /etc/dbus-1/system.d/ | ||
|
||
# Copy entrypoint dbus-dameon script | ||
COPY --chown=builduser:builduser ci/entrypoint.sh /etc/init.d/dbus-session | ||
RUN chmod +x /etc/init.d/dbus-session | ||
|
||
# Allow acccess to dbus socket for builduser | ||
RUN chown builduser:builduser -R /var/run/dbus/ | ||
ENV DBUS_SESSION_BUS_ADDRESS="unix:path=/var/run/dbus/system_bus_socket" | ||
ENV DISPLAY :99.0 | ||
|
||
COPY --chown=builduser:builduser . /home/builduser/ | ||
|
||
USER builduser | ||
WORKDIR /home/builduser | ||
|
||
ENTRYPOINT ["/etc/init.d/dbus-session"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
<!-- This configuration file controls the systemwide message bus. | ||
Add a system-local.conf and edit that rather than changing this | ||
file directly. --> | ||
|
||
<!-- Note that there are any number of ways you can hose yourself | ||
security-wise by screwing up this file; in particular, you | ||
probably don't want to listen on any more addresses, add any more | ||
auth mechanisms, run as a different user, etc. --> | ||
|
||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" | ||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | ||
<busconfig> | ||
|
||
<!-- Our well-known bus type, do not change this --> | ||
<type>system</type> | ||
|
||
<!-- Run as special user --> | ||
<user>dbus</user> | ||
|
||
<!-- Fork into daemon mode --> | ||
<fork/> | ||
|
||
<!-- We use system service launching using a helper --> | ||
<standard_system_servicedirs/> | ||
|
||
<!-- This is a setuid helper that is used to launch system services --> | ||
<servicehelper>/usr/lib/dbus-1.0/dbus-daemon-launch-helper</servicehelper> | ||
|
||
<!-- Write a pid file --> | ||
<pidfile>/var/run/dbus/pid</pidfile> | ||
|
||
<!-- Enable logging to syslog --> | ||
<syslog/> | ||
|
||
<!-- Only allow socket-credentials-based authentication --> | ||
<auth>EXTERNAL</auth> | ||
|
||
<!-- Only listen on a local socket. (abstract=/path/to/socket | ||
means use abstract namespace, don't really create filesystem | ||
file; only Linux supports this. Use path=/whatever on other | ||
systems.) --> | ||
<listen>unix:path=/var/run/dbus/system_bus_socket</listen> | ||
|
||
<policy context="default"> | ||
<!-- All users can connect to system bus --> | ||
<allow user="*"/> | ||
|
||
<!-- Holes must be punched in service configuration files for | ||
name ownership and sending method calls --> | ||
<deny own="*"/> | ||
<deny send_type="method_call"/> | ||
|
||
<!-- Signals and reply messages (method returns, errors) are allowed | ||
by default --> | ||
<allow send_type="signal"/> | ||
<allow send_requested_reply="true" send_type="method_return"/> | ||
<allow send_requested_reply="true" send_type="error"/> | ||
|
||
<!-- All messages may be received by default --> | ||
<allow receive_type="method_call"/> | ||
<allow receive_type="method_return"/> | ||
<allow receive_type="error"/> | ||
<allow receive_type="signal"/> | ||
|
||
<!-- Allow anyone to talk to the message bus --> | ||
<allow send_destination="org.freedesktop.DBus" | ||
send_interface="org.freedesktop.DBus" /> | ||
<allow send_destination="org.freedesktop.DBus" | ||
send_interface="org.freedesktop.DBus.Introspectable"/> | ||
<allow send_destination="org.freedesktop.DBus" | ||
send_interface="org.freedesktop.DBus.Properties"/> | ||
<!-- But disallow some specific bus services --> | ||
<deny send_destination="org.freedesktop.DBus" | ||
send_interface="org.freedesktop.DBus" | ||
send_member="UpdateActivationEnvironment"/> | ||
<deny send_destination="org.freedesktop.DBus" | ||
send_interface="org.freedesktop.DBus.Debug.Stats"/> | ||
<deny send_destination="org.freedesktop.DBus" | ||
send_interface="org.freedesktop.systemd1.Activator"/> | ||
</policy> | ||
|
||
<!-- Only systemd, which runs as root, may report activation failures. --> | ||
<policy user="root"> | ||
<allow send_destination="org.freedesktop.DBus" | ||
send_interface="org.freedesktop.systemd1.Activator"/> | ||
</policy> | ||
|
||
<!-- root may monitor the system bus. --> | ||
<policy user="root"> | ||
<allow send_destination="org.freedesktop.DBus" | ||
send_interface="org.freedesktop.DBus.Monitoring"/> | ||
</policy> | ||
|
||
<!-- If the Stats interface was enabled at compile-time, root may use it. | ||
Copy this into system.local.conf or system.d/*.conf if you want to | ||
enable other privileged users to view statistics and debug info --> | ||
<policy user="root"> | ||
<allow send_destination="org.freedesktop.DBus" | ||
send_interface="org.freedesktop.DBus.Debug.Stats"/> | ||
</policy> | ||
|
||
<!-- Include legacy configuration that was preserved in a Debian upgrade, | ||
if any --> | ||
<include ignore_missing="yes">/etc/dbus-1/system.conf.dpkg-bak</include> | ||
|
||
<!-- The defaults for these limits are hard-coded in dbus-daemon. | ||
Some clarifications: | ||
Times are in milliseconds (ms); 1000ms = 1 second | ||
133169152 bytes = 127 MiB | ||
33554432 bytes = 32 MiB | ||
150000ms = 2.5 minutes --> | ||
|
||
<!-- Config files are placed here that among other things, punch | ||
holes in the above policy for specific services. --> | ||
|
||
|
||
<include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include> | ||
|
||
</busconfig> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
if [[ ! -f /var/run/dbus/system_bus_socket ]]; then | ||
export DISPLAY=:99.0 | ||
dbus-daemon --config-file /etc/dbus-1/system.d/dbus-policy.conf & | ||
fi | ||
|
||
exec "$@" |
Oops, something went wrong.