I am just building a very simple Docker container and, for some reason, the build fails but only when trying to build it inside of a RedHat Linux server. Here's the error that I'm getting:
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up libdevmapper1.02.1:amd64 (2:1.02.173-1) ...
Setting up libcryptsetup12:amd64 (2:2.3.4-1) ...
Setting up systemd (247.1-3) ...
Traceback (most recent call last):
File "/bin/docker-compose", line 11, in <module>
load_entry_point('docker-compose==1.18.0', 'console_scripts', 'docker-compose')()
File "/usr/lib/python3.6/site-packages/compose/cli/main.py", line 71, in main
command()
File "/usr/lib/python3.6/site-packages/compose/cli/main.py", line 124, in perform_command
handler(command, command_options)
File "/usr/lib/python3.6/site-packages/compose/cli/main.py", line 254, in build
build_args=build_args)
File "/usr/lib/python3.6/site-packages/compose/project.py", line 364, in build
service.build(no_cache, pull, force_rm, memory, build_args)
File "/usr/lib/python3.6/site-packages/compose/service.py", line 972, in build
all_events = stream_output(build_output, sys.stdout)
File "/usr/lib/python3.6/site-packages/compose/progress_stream.py", line 23, in stream_output
print_output_event(event, stream, is_terminal)
File "/usr/lib/python3.6/site-packages/compose/progress_stream.py", line 90, in print_output_event
stream.write("%s%s" % (event['stream'], terminator))
UnicodeEncodeError: 'ascii' codec can't encode character '\u2192' in position 74: ordinal not in range(128)
and here's my Dockerfile:
FROM kalilinux/kali-rolling
# Set environment variable for non-interactive install
ARG DEBIAN_FRONTEND=noninteractive
# Run basic commands to update the image
RUN apt update && \
apt dist-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" && \
apt autoremove -y && \
apt clean -y && \
apt install -yqq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
dnsutils \
gobuster \
iputils-ping \
kali-linux-default \
lftp \
ntpdate \
parallel && \
echo "syntax on" >> ~/.vimrc && \
echo "set tabstop=2" >> ~/.vimrc && \
echo "set shiftwidth=2" >> ~/.vimrc && \
echo "set expandtab" >> ~/.vimrc && \
echo "set nu!" >> ~/.vimrc && \
echo "set smartindent" >> ~/.vimrc
Is the problem in my Dockerfile or is there actually something wrong with one of the tools that the image is running into when installing it?