# syntax=docker/dockerfile:experimental FROM ubuntu:18.04 MAINTAINER anon <cloud@futuremobile.net> RUN apt-get update RUN apt-get install -y git RUN echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config RUN --mount=type=ssh git clone git@github.com:XYZ && cd XYZ && touch hello && git add hello && git commit -s -m "Push a file from inside of a container" && git push WORKDIR /tmp CMD ["echo hello world"]
$ DOCKER_BUILDKIT=1 docker build . -t hello:0.1 —ssh default
There was an error while loading. Please reload this page.