pkgx & Docker

We provide an image based on Debian Buster (slim) preloaded with pkgx:

$ docker run -it pkgxdev/pkgx
docker $ env +node@16
docker $ npm start

You can use this as a base:

FROM pkgxdev/pkgx
RUN pkgx +node@16 npm start

Or if you want to use pkgx in another image:

FROM archlinux
RUN curl -Ssf --proto '=https' https://pkgx.sh | sh
RUN pkgx +node@16 npm start

We have binaries for Linux aarch64 (arm64) thus Docker on your Apple Silicon Mac is as fast and easy as deployments.

At this time our shellcode doesn’t work in Docker, but we are working on making pkgx able to be a proxy shell for these situations.

dev

dev works in our image but because Docker steps are each individual shells our shellcode only works in that step. Thus:

FROM pkgxdev/pkgx
RUN dev && npm start

To use dev in another image is more complicated but there are a couple options:

FROM ubuntu

# Install curl in case it isn't already
RUN apt update && apt upgrade && apt install curl

RUN eval "$(curl https://pkgx.sh)" && dev && npm start

evaling our installer integrates the shell code into the current shell.

Alternatively you can use pkgx integrate provided docker is instructed to use a more advanced shell like bash:

FROM ubuntu

SHELL ["/bin/bash", "-c"]

# Install curl in case it isn't already
RUN apt update && apt upgrade && apt install curl

RUN curl https://pkgx.sh | sh
RUN pkgx integrate
RUN dev && npm start  # you still have to run `dev && ` tho

Last updated