fix: docker file
This commit is contained in:
		
							parent
							
								
									b83ee9990c
								
							
						
					
					
						commit
						74d095bcbc
					
				
							
								
								
									
										2
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										2
									
								
								Makefile
								
								
								
								
							| 
						 | 
				
			
			@ -6,7 +6,7 @@ GOFMT ?= gofmt "-s"
 | 
			
		|||
GOFILES := $(shell find . -name "*.go")
 | 
			
		||||
LDFLAGS := -s -w
 | 
			
		||||
VERSION="v1.0.1"
 | 
			
		||||
DOCKER_REPO="reg.wang/app-cloudep-permission-service"
 | 
			
		||||
DOCKER_REPO="container.wang/app-cloudep-permission-service"
 | 
			
		||||
 | 
			
		||||
.PHONY: test
 | 
			
		||||
test: # 進行測試
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,11 +2,12 @@
 | 
			
		|||
# BUILDER #
 | 
			
		||||
###########
 | 
			
		||||
 | 
			
		||||
FROM golang:1.24.0 AS builder
 | 
			
		||||
FROM golang:1.24.0 as builder
 | 
			
		||||
 | 
			
		||||
ARG VERSION
 | 
			
		||||
ARG BUILT
 | 
			
		||||
ARG GIT_COMMIT
 | 
			
		||||
ARG SSH_PRV_KEY
 | 
			
		||||
 | 
			
		||||
# private go packages
 | 
			
		||||
ENV GOPRIVATE=code.30cm.net
 | 
			
		||||
| 
						 | 
				
			
			@ -16,12 +17,15 @@ COPY . .
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
RUN apt-get update && \
 | 
			
		||||
    apt-get install -y git && \
 | 
			
		||||
    mkdir /root/.ssh
 | 
			
		||||
    apt-get install git
 | 
			
		||||
 | 
			
		||||
# Make the root foler for our ssh
 | 
			
		||||
RUN --mount=type=secret,id=ssh_key,dst=/root/.ssh/id_rsa \
 | 
			
		||||
    ssh-keyscan git.30cm.net >> /root/.ssh/known_hosts
 | 
			
		||||
RUN mkdir -p /root/.ssh && \
 | 
			
		||||
    chmod 0700 /root/.ssh && \
 | 
			
		||||
    ssh-keyscan git.30cm.net > /root/.ssh/known_hosts && \
 | 
			
		||||
    echo "$SSH_PRV_KEY" > /root/.ssh/id_rsa && \
 | 
			
		||||
    chmod 600 /root/.ssh/id_rsa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
RUN --mount=type=ssh go mod download
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,22 @@
 | 
			
		|||
// Code generated by goctl. DO NOT EDIT.
 | 
			
		||||
// goctl 1.8.1
 | 
			
		||||
// Source: permission.proto
 | 
			
		||||
 | 
			
		||||
package server
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"code.30cm.net/digimon/app-cloudep-permission-server/gen_result/pb/permission"
 | 
			
		||||
	"code.30cm.net/digimon/app-cloudep-permission-server/internal/logic/permissionservice"
 | 
			
		||||
	"code.30cm.net/digimon/app-cloudep-permission-server/internal/svc"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type PermissionServiceServer struct {
 | 
			
		||||
	svcCtx *svc.ServiceContext
 | 
			
		||||
	permission.UnimplementedPermissionServiceServer
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func NewPermissionServiceServer(svcCtx *svc.ServiceContext) *PermissionServiceServer {
 | 
			
		||||
	return &PermissionServiceServer{
 | 
			
		||||
		svcCtx: svcCtx,
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
// Code generated by goctl. DO NOT EDIT.
 | 
			
		||||
// goctl 1.7.3
 | 
			
		||||
// goctl 1.8.1
 | 
			
		||||
// Source: permission.proto
 | 
			
		||||
 | 
			
		||||
package server
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,6 +15,10 @@ func (use *additional) GetAll() map[string]string {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
func (use *additional) Set(key token.Additional, val string) {
 | 
			
		||||
	if use.additional == nil {
 | 
			
		||||
		use.additional = make(map[string]string)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	use.additional[key.String()] = val
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue