#110: Started fix for docker container versions and k8s support
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o webapp .
|
||||
FROM alpine:latest as certs
|
||||
RUN apk --update add ca-certificates
|
||||
|
||||
from scratch
|
||||
FROM alpine:3.12
|
||||
|
||||
COPY --from=builder /app/ /app
|
||||
COPY --from=builder /app_sdk/ /app_sdk
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#!/bin/bash
|
||||
NAME=app_sdk
|
||||
VERSION=0.2.0
|
||||
VERSION=0.6.0
|
||||
|
||||
docker rmi frikky/shuffle:$NAME --force
|
||||
docker build . -t frikky/shuffle:$NAME -t frikky/$NAME:$VERSION
|
||||
docker rmi docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION --force
|
||||
docker build . -t frikky/shuffle:$NAME -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION
|
||||
|
||||
docker push frikky/shuffle:$NAME
|
||||
docker push frikky/$NAME:$VERSION
|
||||
#docker push frikky/shuffle:$NAME
|
||||
#docker push frikky/$NAME:$VERSION
|
||||
docker push docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION
|
||||
|
||||
@@ -11,11 +11,12 @@ import (
|
||||
"fmt"
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/container"
|
||||
network "github.com/docker/docker/api/types/network"
|
||||
"github.com/docker/docker/client"
|
||||
natting "github.com/docker/go-connections/nat"
|
||||
"github.com/go-git/go-billy/v5"
|
||||
|
||||
network "github.com/docker/docker/api/types/network"
|
||||
natting "github.com/docker/go-connections/nat"
|
||||
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
@@ -180,9 +181,10 @@ func buildImageMemory(fs billy.Filesystem, tags []string, dockerfileFolder strin
|
||||
// Dockerfile is inside the TAR itself. Not local context
|
||||
// docker build --build-arg http_proxy=http://my.proxy.url
|
||||
buildOptions := types.ImageBuildOptions{
|
||||
Remove: true,
|
||||
Tags: tags,
|
||||
BuildArgs: map[string]*string{},
|
||||
Remove: true,
|
||||
Tags: tags,
|
||||
BuildArgs: map[string]*string{},
|
||||
NetworkMode: "host",
|
||||
}
|
||||
|
||||
httpProxy := os.Getenv("HTTP_PROXY")
|
||||
@@ -242,9 +244,10 @@ func buildImage(tags []string, dockerfileFolder string) error {
|
||||
|
||||
dockerFileTarReader := bytes.NewReader(buf.Bytes())
|
||||
buildOptions := types.ImageBuildOptions{
|
||||
Remove: true,
|
||||
Tags: tags,
|
||||
BuildArgs: map[string]*string{},
|
||||
Remove: true,
|
||||
Tags: tags,
|
||||
BuildArgs: map[string]*string{},
|
||||
NetworkMode: "host",
|
||||
}
|
||||
|
||||
httpProxy := os.Getenv("HTTP_PROXY")
|
||||
|
||||
@@ -666,7 +666,7 @@ func handleApiAuthentication(resp http.ResponseWriter, request *http.Request) (U
|
||||
if len(Userdata.Username) > 0 {
|
||||
return Userdata, nil
|
||||
} else {
|
||||
return Userdata, errors.New(fmt.Sprintf("User is invalid - no username found: %#v", Userdata))
|
||||
return Userdata, errors.New(fmt.Sprintf("User is invalid - no username found"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user