I have the following in my Dockerfile:
# setup powershell
# Download the Microsoft repository GPG keys
RUN wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
# Register the Microsoft repository GPG keys
RUN dpkg -i packages-microsoft-prod.deb
# Update the list of products
RUN apt-get update && apt-get install -y \
libunwind8 \
libicu55 \
powershell
# Register Powershell repo
RUN powershell Register-PSRepository ...
According to everything I have read, this should work, however I get the following output during docker build (censored with sensitive info).
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up liburcu4:amd64 (0.9.1-3) ...
Setting up liblttng-ust-ctl2:amd64 (2.7.1-1) ...
Setting up liblttng-ust0:amd64 (2.7.1-1) ...
Setting up powershell (7.0.0-1.ubuntu.16.04) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Removing intermediate container 1ef0413ecd13
---> a5323d6c8301
Step 12/23 : RUN powershell Register-PSRepository ...<snip>...
---> Running in 604784872cc8
/bin/sh: 1: powershell: not found
The command '/bin/sh -c powershell Register-PSRepository ...<snip>... returned a non-zero code: 127
I am at a loss as to why powershell is not found bearing in mind that apt-get install call for it was successful.
How do invoke powershell after successfully installing it using apt-get?