Toraja / cde

Containerised Development Environment
0 stars 0 forks source link

Better place for binaries in `base/ctx/home/.local/bin` #6

Open Toraja opened 1 year ago

Toraja commented 1 year ago

Summary

Research

Host dir/file

.
├── ctx
│   └── Dockerfile
└── vol
    ├── animals
    │   ├── bear
    │   ├── cat
    │   └── dog
    └── fruits.txt

Dockerfile

# syntax=docker/dockerfile:1
FROM alpine:latest

RUN mkdir -p /wk/vol/ \
  && touch /wk/vol/quack
COPY --from=x . /wk/vol/

Command

docker buildx build --build-context x=vol/ --force-rm -t runmount ctx/

Result

COPY instruction does not overwrite existing files

/ # tree /wk/vol/
/wk/vol/
├── animals
│   ├── bear
│   ├── cat
│   └── dog
├── fruits.txt
└── quack
Toraja commented 1 year ago
Toraja commented 1 year ago

As described in ADR 0006, rewrite required tools in other language and release them instead of using external build context.