How can I install Docker inside an alpine container?

Dockerfile for running docker-cli inside alpine

FROM alpine:3.10
RUN apk add --update docker openrc
RUN rc-update add docker boot

Build docker image

docker build -t docker-alpine .

Run container (host and the alipne container will share the same docker engine)

docker run -it -v "/var/run/docker.sock:/var/run/docker.sock:rw" docker-alpine:latest /bin/sh

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)