mirror of
https://github.com/drone-plugins/drone-buildah.git
synced 2026-06-04 10:15:27 +08:00
remove git username password
This commit is contained in:
@@ -1,3 +1,33 @@
|
||||
FROM fedora
|
||||
|
||||
RUN dnf -y install \
|
||||
make \
|
||||
golang \
|
||||
bats \
|
||||
btrfs-progs-devel \
|
||||
device-mapper-devel \
|
||||
glib2-devel \
|
||||
gpgme-devel \
|
||||
libassuan-devel \
|
||||
libseccomp-devel \
|
||||
git \
|
||||
bzip2 \
|
||||
go-md2man \
|
||||
runc \
|
||||
containers-common \
|
||||
skopeo-containers
|
||||
|
||||
# Workaround - the first install somehow leaves the golang in a bad state
|
||||
RUN dnf -y install golang
|
||||
|
||||
RUN mkdir /root/buildah && \
|
||||
cd /root/buildah && \
|
||||
git clone https://github.com/harness/buildah.git ./src/github.com/containers/buildah
|
||||
|
||||
RUN cd /root/buildah/src/github.com/containers/buildah && make && sudo make install
|
||||
|
||||
|
||||
|
||||
FROM quay.io/buildah/stable:v1.23.0
|
||||
|
||||
USER build
|
||||
@@ -5,7 +35,5 @@ WORKDIR /home/build
|
||||
RUN export STORAGE_DRIVER=vfs
|
||||
# Add plugin binary
|
||||
ADD release/linux/amd64/drone-docker /bin/
|
||||
ADD release/linux/amd64/buildah /bin/
|
||||
ADD release/linux/amd64/imgtype /bin/
|
||||
ADD release/linux/amd64/copy /bin/
|
||||
COPY --from=0 /root/buildah/src/github.com/containers/buildah/bin/. /bin/
|
||||
ENTRYPOINT ["/bin/drone-docker"]
|
||||
+1
-2
@@ -17,8 +17,7 @@ GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-acr ./cmd/drone
|
||||
GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-heroku ./cmd/drone-heroku
|
||||
|
||||
#build buildah binaries
|
||||
docker build --build-arg=GIT_USER_NAME="$(git config user.name)" --build-arg=GIT_USER_EMAIL="$(git config user.email)" \
|
||||
-f Dockerfile-build-buildah -t buildah-dev .
|
||||
docker build -f Dockerfile-build-buildah -t buildah-dev .
|
||||
|
||||
docker container create --name extract buildah-dev
|
||||
docker container cp extract:/root/buildah/src/github.com/containers/buildah/bin/. release/linux/amd64/
|
||||
|
||||
Reference in New Issue
Block a user