Setup

Requirement

OCI-compliant container engine installed such as podman or docker.

Clone helloworld-binding

Set the work directory where the project will be cloned.

This work directory will be mounted inside the SDK container

WORKDIR=${HOME}/project
git clone git@github.com:redpesk-samples/helloworld-binding.git ${WORKDIR}/helloworld-binding

Set redpesk release version

Choose the SDK container version according to the redpesk version you want to develop in.

REDPESK_RELEASE=corn-3.0-update

Please refer to OS redpesk releases chapter to see the list of supported redpesk distributions.

SDK core

The following command allow to:

  • Mount the WORKDIR in the container
  • Attach a bash session for development
  • Mount your .ssh directory & .gitconfig for git operation
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 following command allow to:

  • openvscode-server port publish
  • Mount the WORKDIR in the container
  • Attach a bash session for development
  • Mount your .ssh directory & .gitconfig for git operation
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}

Then open openvscode within your favority browser :

# using Firefox
firefox --new-instance http://0.0.0.0:3000

# using Chromium
chromium --app=http://0.0.0.0:3000

# other
 xdg-open http://0.0.0.0:3000