Skip to content

Commit 1c6a166

Browse files
committed
add docker daemon to dockerfile
1 parent e85ac02 commit 1c6a166

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Dockerfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# syntax=docker/dockerfile:1
22

33
ARG GO_VERSION=1.20
4+
ARG DOCKERD_VERSION=20.10.14
45

56
FROM golang:${GO_VERSION}-alpine as build-deployx
67
RUN mkdir /build
@@ -17,5 +18,7 @@ COPY deploy /build/deploy
1718

1819
RUN go build -o docker-deployx cmd/deployx/*
1920

20-
FROM alpine AS shell
21+
FROM docker:${DOCKERD_VERSION} AS dockerd-release
22+
2123
COPY --from=build-deployx /build/docker-deployx /usr/local/bin
24+
RUN mkdir -p /usr/local/lib/docker/cli-plugins && ln -s /usr/local/bin/docker-deployx /usr/local/lib/docker/cli-plugins/docker-deployx

docker-bake.hcl

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ variable "GO_VERSION" {
33
default = null
44
}
55

6+
variable "DOCKERD_VERSION" {
7+
# default ARG value set in Dockerfile
8+
default = null
9+
}
10+
611
variable "VERSION_TAG" {
7-
default = "0.0.1"
12+
default = "0.0.2"
813
}
914

1015
variable "DOCKERFILE" {
@@ -20,7 +25,7 @@ target "default" {
2025
GO_VERSION = GO_VERSION
2126
}
2227
pull = true
23-
target = "shell"
28+
target = "dockerd-release"
2429
dockerfile = "${DOCKERFILE}"
2530
output = ["type=image"]
2631

0 commit comments

Comments
 (0)