3 次程式碼提交

作者 SHA1 備註 提交日期
  JustAnotherArchivist f8e8becc23 Enable building container images with Drone 2 月之前
  JustAnotherArchivist ced402e4b9 Disable upgrading dependencies on container building 2 月之前
  JustAnotherArchivist 07fec42a1c Replace Dockerfile with Containerfile 2 月之前
共有 2 個檔案被更改,包括 20 行新增2 行删除
分割檢視
  1. +18
    -0
      .drone.yml
  2. +2
    -2
      Containerfile

+ 18
- 0
.drone.yml 查看文件

@@ -0,0 +1,18 @@
---
kind: pipeline
name: default
steps:
- name: docker
image: plugins/docker
settings:
registry: atdr-writer.meo.ws
username:
from_secret: atdr_user
password:
from_secret: atdr_pass
repo: atdr-writer.meo.ws/archiveteam/transfer.sh
dockerfile: Containerfile
purge: true
auto_tag: false
tags:
- latest

Dockerfile → Containerfile 查看文件

@@ -1,6 +1,6 @@
# Default to Go 1.13
ARG GO_VERSION=1.13
FROM golang:${GO_VERSION}-alpine as build
FROM docker.io/library/golang:${GO_VERSION}-alpine as build

# Necessary to run 'go get' and to compile the linked binary
RUN apk add git musl-dev
@@ -12,7 +12,7 @@ WORKDIR /go/src/github.com/dutchcoders/transfer.sh
ENV GO111MODULE=on

# build & install server
RUN go get -u ./... && CGO_ENABLED=0 go build -ldflags -a -tags netgo -ldflags '-w -extldflags "-static"' -o /go/bin/transfersh github.com/dutchcoders/transfer.sh
RUN go get ./... && CGO_ENABLED=0 go build -ldflags -a -tags netgo -ldflags '-w -extldflags "-static"' -o /go/bin/transfersh github.com/dutchcoders/transfer.sh

FROM scratch AS final
LABEL maintainer="Andrea Spacca <andrea.spacca@gmail.com>"

Loading…
取消
儲存