Public
Authored by Rémi Becheras

Script de lancement de devboxes SWAP

Installation

D'abord on créé le fichier devbox-ctl dans notre répertoire de script, par exemple pour moi $HOME/dev/scripts

Puis:

$ export src=$HOME/dev/scripts/devbox-ctl
$ chmod u+x $src
$ export dest=/usr/bin/devbox-ctl
$ sudo ln -s $src $dest

C'est tout ensuite on peut l'utiliser

$ cd $HOME/dev
$ devbox start .
Edited
devbox-ctl 1.11 KB
  • cat <<EOF
    FROM docker.sirap.fr/swap/devbox/api:latest
    ARG username="developer"
    ARG password="developer"
    ARG uid="1000"
    EXPOSE 3000 8448
    LABEL Author="Rémi Becheras <r.becheras@sirap.fr>"
    USER 0
    VOLUME [ "/data" ]
    RUN deluser developer \
      && adduser \
        --disabled-password \
        --home "/home/${username}" \
        --shell /bin/bash \
        --uid "${uid}" \
        --gecos "" \
        "${username}" \
      && echo "${username}:${password}" | chpasswd
    
    USER ${username}
    WORKDIR "/home/${username}"
    COPY ./scripts ./scripts
    RUN ./scripts/gitconf/global-gitlab && ./scripts/gitconf/global-swap
    
    WORKDIR "/home/${username}/app"
    CMD [ "bash" ]
    
    EOF > devbox.Dockerfile
    docker build -t devbox .
    Edited by Rémi Becheras
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment