Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for raspberry pi #5

Closed
cascha42 opened this issue Sep 22, 2018 · 11 comments
Closed

add support for raspberry pi #5

cascha42 opened this issue Sep 22, 2018 · 11 comments

Comments

@cascha42
Copy link

hey,
i want to use the docker-container on an raspberry pi, it stops with this error report:

Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/linux-arm-48_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/linux-arm-48_binding.node": 

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g. 

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

it would be nice, if you have an solution!

greetings

@austinpray
Copy link
Contributor

This should be fixed by the ability to just use a pre-built image #6

@cascha42
Copy link
Author

see #6

@Algram
Copy link
Owner

Algram commented Sep 23, 2018

@c-ascha We have a prebuilt image now, could you try it with docker run -d -p 3000:3000 algram/ytdl-webserver and report if your issue is resolved?

@cascha42
Copy link
Author

hey,
thank you for your time, but im still getting the error:

docker@test:~ $ docker pull algram/ytdl-webserver
Using default tag: latest
latest: Pulling from algram/ytdl-webserver
3b37166ec614: Pull complete 
504facff238f: Pull complete 
ebbcacd28e10: Pull complete 
c7fb3351ecad: Pull complete 
2e3debadcbf7: Pull complete 
f4591f9584b9: Pull complete 
da4c1f954ad2: Pull complete 
059b7ef0ccc8: Pull complete 
1b642b767b90: Pull complete 
7e141aafffb0: Pull complete 
f0f9923c2e58: Pull complete 
c3f239cd6078: Pull complete 
Digest: sha256:2af54982335d403a2a62d6ffbdc5b229f28ff77944d2e3d96142dc807ab69190
Status: Downloaded newer image for algram/ytdl-webserver:latest
docker@test:~ $ docker run -d -p 3000:3000 algram/ytdl-webserver
2ec83197ebee6daaba33bac60003d1bb2d1c2e568f0b6e5d266d14e03bc7be6a
docker@test:~ $ docker ps -a
CONTAINER ID        IMAGE                   COMMAND             CREATED             STATUS                      PORTS               NAMES
2ec83197ebee        algram/ytdl-webserver   "npm start"         19 seconds ago      Exited (1) 15 seconds ago                       festive_roentgen
docker@test:~ $ docker logs 2ec83197ebee
standard_init_linux.go:190: exec user process caused "exec format error"
docker@test:~ $

thank you
c-ascha

@n4bb12
Copy link
Contributor

n4bb12 commented Oct 1, 2018

The container needs to be built for the ARM architecture in order to work on a PI.
One way to do this is to build it on an ARM-based VM and publish a separate tag on Docker Hub for PI users.

@c-ascha does this work for you?

docker run hello-world

Related issue: tiangolo/uwsgi-nginx-flask-docker#67
Related blog: https://blog.alexellis.io/5-things-docker-rpi/

@cascha42
Copy link
Author

cascha42 commented Oct 2, 2018

after adding two lines to the Dockerfile now everything works!

@cascha42 cascha42 closed this as completed Oct 2, 2018
@Algram
Copy link
Owner

Algram commented Oct 2, 2018

@c-ascha Would you mind sharing the changes you made to make it work? Thanks!

@cascha42
Copy link
Author

cascha42 commented Oct 2, 2018

yes, for sure! just here? or where? can we do a second dockerfile only for arm arch?

thanks

@cascha42
Copy link
Author

cascha42 commented Oct 2, 2018

i pushed it to dockerhub: https://hub.docker.com/r/cascha42/ytdl-webserver/

thanks!

@Algram
Copy link
Owner

Algram commented Oct 3, 2018

@c-ascha Just pasting the Dockerfile here would be good enough, I can do the rest for you! The image alone on the Docker Hub won't help since we need the Dockerfile you used. Thanks!

@cascha42
Copy link
Author

cascha42 commented Oct 5, 2018

hey, sorry for the late response. here is the working dockerfile:

i did just two additions:

  • install the build-essentials via apt
  • install node-gyp via npm
#
# Dockerfile for ytdl-webserver
#
FROM ubuntu:16.04

WORKDIR /home/app

RUN apt-get update \
    && apt-get install -y curl ffmpeg build-essential \
    && curl -sL https://deb.nodesource.com/setup_6.x | bash - \
    && apt-get install -y nodejs \
    && npm install -g npm@latest \
    && rm -rf /var/lib/apt/lists/*

# This is on a separate line because youtube-dl needs to be frequentl$
RUN apt-get update \
    && apt-get install -y youtube-dl \
    && rm -rf /var/lib/apt/lists/*

# only install node_modules if the package.json changes
COPY package.json package-lock.json ./
RUN npm install -g node-gyp
RUN npm ci

COPY . ./
RUN mkdir -p public/temp \
    && npm run build

EXPOSE 3000
CMD [ "npm", "start" ]

we could add this to the master branch, but it would then always download these not that small packages too, so i would not do that.

thank you
c-ascha

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

No branches or pull requests

4 participants