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.

Docker In Docker for code-server

See original GitHub issue

I’ve been trying to fiddle with the Dockerfile of code-server to add support for Docker in Docker but without success, I tried numerous ubuntu images but then code-server will have problem running:

those are the ones I tested: https://hub.docker.com/r/billyteves/ubuntu-dind https://hub.docker.com/r/jazzypro/ubuntu-dind https://hub.docker.com/r/ciiichy/ubuntu-dind-git https://hub.docker.com/r/ceregousa/dind https://hub.docker.com/r/huksley/ubuntu-dind/dockerfile

most of the times i’m getting

{"data":"Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /root/project/.local/share/code-server/dependencies/spdlog.node)\n    at Object.Module._extensions..node (module.js:682:18)\n    at Module.load (module.js:566:32)\n    at tryModuleLoad (module.js:506:12)\n    at Function.Module._load (module.js:498:3)\n    at Module.require (module.js:597:17)\n    at Module.patchedRequire [as require] (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), <anonymous>:6615:46)\n    at require (internal/module.js:11:18)\n    at f (/usr/local/bin/code-server:2281:1092)\n    at u (/usr/local/bin/code-server:2281:1344)\n    at c (/usr/local/bin/code-server:2281:2750)\n    at b.require (/usr/local/bin/code-server:2281:3346)\n    at Object../lib/vscode/node_modules/spdlog/index.js (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), <anonymous>:28679:16)\n    at __webpack_require__ (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), <anonymous>:26:30)\n    at Object.createSpdLogService (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), <anonymous>:157268:29)\n    at main (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), <anonymous>:77357:92)\n    at eval (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), <anonymous>:77449:13)\n    at Generator.next (<anonymous>)\n    at fulfilled (eval at exports.requireModule (/usr/local/bin/code-server:468:27625), <anonymous>:77333:58)\n    at <anonymous>\n    at process._tickCallback (internal/process/next_tick.js:189:7)\n"}
code-server_1     | INFO  Retrying shared process in 8s {"error":"Exited with null"}

when code-server is trying to boot up, do you have any idea to do what i’m trying to achieve ?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
matthew-parlettecommented, Aug 15, 2019

In case anyone is looking to do this with kubernetes, here is my deployment I’m using that has this working as far as I’ve tested:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: code-server
  namespace: default
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: code-server
    spec:
      initContainers:
      - name: copy-docker-binary
        image: docker:stable-dind
        command: ['sh', '-c', 'cp /usr/local/bin/docker /code-server-bin/']
        volumeMounts:
        - name: code-server-usr-local-bin
          mountPath: /code-server-bin
      containers:
      - name: code-server
        image: linuxserver/code-server
        imagePullPolicy: Always
        ports:
        - containerPort: 8443
          name: https
        envFrom:
        - configMapRef:
            name: code-server
        - secretRef:
            name: code-server
        volumeMounts:
        - name: config
          mountPath: /config
          readOnly: false
        - name: code-server-usr-local-bin
          mountPath: /usr/local/bin
      - name: dind-daemon
        image: docker:stable-dind
        env:
        - name: DOCKER_TLS_CERTDIR
          value: ""
        resources:
          requests:
            cpu: 20m
            memory: 512Mi
        securityContext:
            privileged: true
        volumeMounts:
          - name: docker-graph-storage
            mountPath: /var/lib/docker
      volumes:
      - name: config
        persistentVolumeClaim:
          claimName: code-server-config
      - name: docker-graph-storage
        emptyDir: {}
      - name: code-server-usr-local-bin
        emptyDir: {}

Let me know if you need my other resources for this, but I believe everything for this issue is covered in this deployment.

1reaction
sr229commented, Apr 27, 2019

CC @kylecarbs or @coadler to close the issue as per request by the author

Read more comments on GitHub >

github_iconTop Results From Across the Web

linuxserver/code-server - Docker Image
The LinuxServer.io team brings you another container release featuring: regular and timely application updates; easy user mappings (PGID, PUID) ...
Read more >
Docker In Docker for code-server · Issue #199 - GitHub
I've been trying to fiddle with the Dockerfile of code-server to add support for Docker in Docker but without success, I tried numerous ......
Read more >
Code-Server - VS Code on Docker - EasyCode
Code-Server is a VS Code instance running on Docker accessible via a browser · It can be run on a powerful remote server...
Read more >
Running VS Code Code-server in Docker / Docker Compose
This guide will show you how to run Code Server on Docker/Docker Compose. 1. Install Docker on Ubuntu. Update your system packages sudo...
Read more >
How to Run OpenVSCode Server via LinuxServer.io's Docker ...
I tend to check here first when I need a new image. This image vs the code-server image. Before you ask: I cannot...
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