Skip to content

Languages ​

Swift ​

Swift 6.4.0, from the official Swift image: compiler, Swift Package Manager and Foundation.

bash
swift --version

# a single file
echo 'print("Hello from Swift")' > hello.swift
swiftc hello.swift -o hello && ./hello

# a package
swift package init --type executable
swift run

Objective-C ​

Objective-C is compiled with GCC's Objective-C compiler (gobjc) against the GNUstep Base library, which provides Foundation (NSString, NSArray, NSLog, …). There is no AppKit / UIKit: this is for command-line code.

objc
// hello.m
#import <Foundation/Foundation.h>

int main(void) {
    NSAutoreleasePool *pool = [NSAutoreleasePool new];
    NSLog(@"Hello from Objective-C");
    [pool drain];
    return 0;
}
bash
gcc -fconstant-string-class=NSConstantString -I/usr/include/GNUstep \
    hello.m -o hello -lgnustep-base -lobjc
./hello

GCC does not support some modern Objective-C syntax, such as @autoreleasepool and ARC. Use NSAutoreleasePool and manual memory management as shown above.

Building with GNUstep make ​

For more than a single file, let GNUstep's build system work out the compiler flags. Put a GNUmakefile next to your sources:

make
include $(GNUSTEP_MAKEFILES)/common.make

TOOL_NAME = hello
hello_OBJC_FILES = hello.m

include $(GNUSTEP_MAKEFILES)/tool.make
bash
make
./obj/hello

List more source files in hello_OBJC_FILES, separated by spaces. GNUSTEP_MAKEFILES is already set in the container.

Go ​

Go 1.27.1, from the official Go distribution.

bash
go version
go mod init example.com/hello
go run .

Node.js ​

Node.js 26.10.0 with npm, from the official Node.js distribution.

bash
node --version
npm install

Python ​

Python 3 with pip. python points to python3.

bash
python --version
pip install requests

pip install works directly, as it does on a regular machine. Packages are installed system-wide inside the container, so they are lost when the container is removed.

To keep a project's packages across containers, create a virtual environment inside /workspace, which lives on your machine:

bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Run source .venv/bin/activate again in each new shell. Add .venv/ to your project's .gitignore.