question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run clasp in a Docker container.

See original GitHub issue

Expected Behavior

I should be able to run clasp in a docker container.

Actual Behavior

Unable to authenticate as localhost service is listening on a random port.

Steps to Reproduce the Problem

  1. docker-compose.yml
version: '2'

services:

  svc_gsuite:
    image: chrisgarrett/node-dev:8.2.1
    command: npm run up
    volumes:
    - ./src:/work/app
    - ~/.clasprc.json:/home/node/.clasprc.json
  1. up script entry in package.json:
"up": "yarn install && npx clasp login && npm run watch",
  1. copy link in and paste into browser.
  2. redirection fails because port is random.

Specifications

  • Node version (node -v): 8.2.1
  • Version (clasp -v): 1.5.3
  • OS (Mac/Linux/Windows): alpine 3.6

Options

  1. Use an environment variable to specify port. This feels pretty natural as there are many node examples where this is used. I have this working already in my fork
  2. Add an argument to login to specify the port.

Thoughts?

I will submit a PR for either of these after some feedback.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
grantcommented, Aug 23, 2018

Can you be more specific on how you used clasp?

Can you run:

clasp login --no-localhost

What is the error you see?

See https://github.com/google/clasp#login

0reactions
grantcommented, Aug 29, 2018

The clasp login --no-localhost option is for computers that can’t run local servers. If you want to not login at all, just login once and copy the ~/.clasprc to your machine’s home directory. Let me know if there’s something that you’d like changed, but this case of not using localhost is expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I can't set up **** clasp run **** - Stack Overflow
Does anyone know how to solve this problem? And thank you for reading. Environment: OS: Ubuntu 20.04.4 LTS. OS Type: 64-bit. GNOME: 3.36.8....
Read more >
clfoundation/clasp - Docker Image
Clasp is a new Common Lisp implementation that seamlessly interoperates with C++ libraries and programs using LLVM for compilation to native code.
Read more >
clasp - The Apps Script CLI - Google Codelabs
In this codelab, you'll learn how to use clasp - the Apps Script CLI - to pull, push, and deploy your Apps Script...
Read more >
Posts from Recent Questions - Stack Overflow for 11/20/2021
Some Docker containers don't run when created from the command line ... Run multiple Google Apps Script clasp commands in parallel using a ......
Read more >
NVIDIA DGX-1
designed to run a number of NVIDIA-optimized deep learning framework applications packaged in Docker containers. You can use your own scheduling and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found