Git Product home page Git Product logo

coder-core's Introduction

coder-core


This is my opinionated attempt to build a "lightweight" docker image powerful enough to run vscode remote containers or to be used as a base image to create docker container GitHub Actions.

The not-that-lightweight actually means that while ubuntu:latest is ~78MB, this image is ~90MB. Yes, this translates to extra 12MB compared to ubuntu, but the preinstalled tools are by far more comprehensive (see bellow).

Features

  1. Based on Alpine instead of Ubuntu. This translates to musl being used instead of glib, but compatibility libraries are also preinstalled.
  2. Its is Alpine, but using bash instead of ash.
  3. By using tini, we ensure that child processes are correctly reaped.
  4. Default user coder and group coder using UID and GID = 1000, to ease volume-mapping permissions issues.
  5. Passwordless, sudo support: easily install extra packages with apk (e.g, sudo apk add docker-cli jq)
  6. Preinstalled node (v16.19.1) and npm (8.10.0) !!!
  7. Preinstalled tooling (git, curl, socat, openssh-client, nano, unzip, brotli, zstd, xz) !!!
  8. Image is hosted on GitHub Container Registry, hence we get fast pulls whenever using this image with GitHub Actions.

Guidelines that I follow

  • Whenever possible, install software directly from the Alpine repositories, i.e. use apk instead of downloading / manually installing them.
  • Keep it small: do not cross the 100MB image size boundary.
  • Multi arch (amd64 && arm64)

Usage

# docker run -it ghcr.io/raonigabriel/coder-core:latest
coder@65dc49a66e7c:~$

Creating your own derived image (Java example)

FROM ghcr.io/raonigabriel/coder-core:latest
# Installing Java and tools
RUN sudo apk --no-cache add maven gradle
# Setup env variables
ENV JAVA_HOME=/usr/lib/jvm/default-jvm \
    MAVEN_HOME=/usr/share/java/maven-3 \
    GRADLE_HOME=/usr/share/java/gradle

See my spring-qrcode-example for a full example on how to setup a remote container for development.


Licenses

Apache License 2.0


Disclaimer

  • This code comes with no warranty. Use it at your own risk.
  • I don't like Apple. Fuck off, fan-boys.
  • I don't like left-winged snowflakes. Fuck off, code-covenant.
  • I will call my branches the old way. Long live master, fuck-off renaming.

coder-core's People

Contributors

dependabot[bot] avatar raonigabriel avatar raonigabrielrezolve avatar snyk-bot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

drunkod

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.