Skip to content

Commit

Permalink
Fix 2nd install method and add more cleaning to delete lately added u…
Browse files Browse the repository at this point in the history
…nneeded files on Dockerfile
  • Loading branch information
OscarAkaElvis committed Oct 24, 2024
1 parent 4b5312f commit 0fe16c7
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ RUN apk --no-cache add cmake \
zlib-dev \
openssl-dev \
openssl \
bash
bash \
git

# Make the ruby path available
ENV PATH=$PATH:/opt/rubies/ruby-3.2.2/bin
Expand All @@ -45,9 +46,12 @@ RUN cd /tmp/ && \
cd ruby-install-0.8.1/ && make install && \
ruby-install -c ruby 3.2.2 -- --with-readline-dir=/usr/include/readline --with-openssl-dir=/usr/include/openssl --disable-install-rdoc

# Set directory for the deploy of the application
WORKDIR /opt

# Evil-WinRM install method 1 (only one method can be used, other must be commented)
# Install Evil-WinRM (DockerHub automated build process)
RUN mkdir /opt/evil-winrm
RUN mkdir evil-winrm
COPY . /opt/evil-winrm

# Evil-WinRM install method 2 (only one method can be used, other must be commented)
Expand All @@ -70,7 +74,13 @@ RUN rm -rf /opt/evil-winrm/resources > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/CONTRIBUTING.md > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/CODE_OF_CONDUCT.md > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/Dockerfile > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/Gemfile* > /dev/null 2>&1
rm -rf /opt/evil-winrm/Gemfile* > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/evil-winrm.gemspec > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/.rubocop.yml > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/.editorconfig > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/.gitignore > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/.gitattributes > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/bin > /dev/null 2>&1

# Rename script name
RUN mv /opt/evil-winrm/evil-winrm.rb /opt/evil-winrm/evil-winrm && \
Expand Down

0 comments on commit 0fe16c7

Please sign in to comment.