Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

/bin/sh: 1: /bootstrap.sh: not found #10

Open
Cufee opened this issue Apr 15, 2020 · 1 comment
Open

/bin/sh: 1: /bootstrap.sh: not found #10

Cufee opened this issue Apr 15, 2020 · 1 comment

Comments

@Cufee
Copy link

Cufee commented Apr 15, 2020

When running on Widows after building with Docker or Gradle
docker run -p 5900:5900 --name chrome --user apps --privileged local/chrome:0.0.1

Here is a file tree

│   .gitignore
│   build.gradle
│   gradle.properties
│   gradlew
│   gradlew.bat
│   LICENSE.md
│   README.md
│   settings.gradle
│
├───.gradle
│   └───3.3
│       └───taskArtifacts
│               taskArtifacts.lock
│
├───docs
│   ├───building
│   │       README.md
│   │
│   └───configuration
│           README.md
│
├───gradle
│   └───wrapper
│           gradle-wrapper.jar
│           gradle-wrapper.properties
│
└───image
        bootstrap.sh
        Dockerfile
@Mota-sem
Copy link

Windows uses the two-character sequence CR LF in bootstrap.sh. You just need to remove all \r, or just use my Dockerfile:

FROM ubuntu:16.04

RUN apt-get update && apt-get clean && apt-get install -y \
    x11vnc \
    xvfb \
    fluxbox \
    wmctrl \
    wget \
    && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
    && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \
    && apt-get update && apt-get -y install google-chrome-stable

RUN useradd apps \
    && mkdir -p /home/apps \
    && chown -v -R apps:apps /home/apps

COPY bootstrap.sh /

RUN sed -i -e 's/\r$//' bootstrap.sh \
	&& chmod +x bootstrap.sh

CMD './bootstrap.sh'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants