mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 17:40:35 +08:00
15 lines
528 B
Docker
15 lines
528 B
Docker
# step1: build entrypoint execute program init_portainer by golang
|
|
FROM golang:latest AS builder
|
|
WORKDIR /
|
|
COPY init_portainer.go /
|
|
RUN go build -o init_portainer /init_portainer.go
|
|
RUN chmod +x /init_portainer
|
|
|
|
# step2: copy build go program to portainer
|
|
# Dockerfile refer to: https://github.com/portainer/portainer/blob/develop/build/linux/Dockerfile
|
|
FROM portainer/portainer-ce:2.19.0
|
|
LABEL maintainer="websoft9<help@websoft9.com>"
|
|
LABEL version="2.19.0"
|
|
COPY --from=builder /init_portainer /
|
|
|
|
ENTRYPOINT ["/init_portainer"] |