mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-22 15:40:22 +00:00
portainer image
This commit is contained in:
parent
28a2a55376
commit
1517550430
2 changed files with 12 additions and 10 deletions
10
docker/w9portainer/Dockerfile
Normal file
10
docker/w9portainer/Dockerfile
Normal file
|
@ -0,0 +1,10 @@
|
|||
# step1: build entrypoint execute program init_portainer by golang
|
||||
FROM golang:latest AS builder
|
||||
WORKDIR /
|
||||
COPY init_portainer.go /init_portainer.go
|
||||
RUN go build -o init_portainer init_portainer.go
|
||||
RUN chmod +x ./init_portainer
|
||||
|
||||
# step2: copy build go program to portainer
|
||||
FROM portainer/portainer-ce:2.19.0
|
||||
COPY --from=builder /init_portainer /
|
|
@ -6,17 +6,9 @@ services:
|
|||
portainer:
|
||||
container_name: websoft9-portainer
|
||||
build:
|
||||
image: websoft9dev/portainer
|
||||
context: .
|
||||
dockerfile_inline: |
|
||||
# step1: build entrypoint execute program init_portainer by golang
|
||||
FROM golang:latest AS builder
|
||||
WORKDIR /
|
||||
COPY init_portainer.go /init_portainer.go
|
||||
RUN go build -o init_portainer init_portainer.go
|
||||
RUN chmod +x ./init_portainer
|
||||
# step2: copy build go program to portainer
|
||||
FROM portainer/portainer-ce:2.19.0
|
||||
COPY --from=builder /init_portainer /
|
||||
dockerfile: Dockerfile
|
||||
entrypoint: ["/init_portainer"]
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
|
|
Loading…
Reference in a new issue