Setup

Requirements

Install an OCI-compatible container engine such as Podman or Docker.

Prepare a work directory

Choose a host directory that will be mounted inside the SDK container:

WORKDIR=${HOME}/project
mkdir -p "${WORKDIR}"

This tutorial uses helloworld-binding. Clone the sample under the work directory by following its Build and installation chapter. The expected source path for the examples below is:

${WORKDIR}/helloworld-binding

Set the redpesk release

Choose an SDK container tag matching the redpesk release you want to target:

REDPESK_RELEASE=corn-3.0-update

See redpesk OS releases for the list of supported distributions.

SDK core

The following command:

  • mounts WORKDIR inside the container;
  • starts an interactive shell for development;
  • mounts the host SSH configuration and Git configuration read-only.
podman run \
    --tty \
    --init \
    --interactive \
    --name sdk-core \
    --userns keep-id \
    --workdir "${WORKDIR}" \
    --security-opt label=disable \
    --volume "${WORKDIR}:${WORKDIR}" \
    --volume "${HOME}/.ssh:${WORKDIR}/.ssh:ro" \
    --volume "${HOME}/.gitconfig:${WORKDIR}/.gitconfig:ro" \
    "registry.redpesk.bzh/redpesk-ci/redpesk-sdk-core:${REDPESK_RELEASE}" bash

SDK openvscode-server

The OpenVSCode Server flavour exposes the IDE on TCP port 3000 while mounting the same development files:

podman run \
    --init \
    --detach \
    --userns keep-id \
    --publish 3000:3000 \
    --workdir "${WORKDIR}" \
    --name sdk-openvscode-server \
    --security-opt label=disable \
    --volume "${WORKDIR}:${WORKDIR}" \
    --volume "${HOME}/.ssh:${WORKDIR}/.ssh:ro" \
    --volume "${HOME}/.gitconfig:${WORKDIR}/.gitconfig:ro" \
    "registry.redpesk.bzh/redpesk-ci/redpesk-sdk-openvscode-server:${REDPESK_RELEASE}"

Open the IDE from a browser:

firefox --new-instance http://localhost:3000

or:

chromium --app=http://localhost:3000

You can also use the desktop default browser:

xdg-open http://localhost:3000