Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gost
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
gost
Commits
6e46ac03
Commit
6e46ac03
authored
Apr 05, 2020
by
Scott Edlund
Committed by
ginuerzh
Apr 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build go binaries without QEMU
parent
f0c9079f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
18 deletions
+28
-18
.github/workflows/buildx.yaml
.github/workflows/buildx.yaml
+16
-16
Dockerfile
Dockerfile
+8
-2
docker-compose.yaml
docker-compose.yaml
+4
-0
No files found.
.github/workflows/buildx.yaml
View file @
6e46ac03
...
@@ -47,14 +47,14 @@ jobs:
...
@@ -47,14 +47,14 @@ jobs:
-
name
:
Docker Buildx (no push)
-
name
:
Docker Buildx (no push)
run
:
|
run
:
|
docker buildx b
uild
\
docker buildx b
ake
\
--
platform
${{ steps.prepare.outputs.docker_platforms }} \
--
set ${{ github.event.repository.name }}.platform=
${{ steps.prepare.outputs.docker_platforms }} \
--
output "type=image,push=false"
\
--
set ${{ github.event.repository.name }}.output=type=image,push=false
\
--
build-arg "VERSION=${{ steps.prepare.outputs.version }}"
\
--
set ${{ github.event.repository.name }}.args.VERSION=${{ steps.prepare.outputs.version }}
\
--
build-arg "BUILD_DATE=${{ steps.prepare.outputs.build_date }}"
\
--
set ${{ github.event.repository.name }}.args.BUILD_DATE=${{ steps.prepare.outputs.build_date }}
\
--
build-arg "VCS_REF=${GITHUB_SHA::8}"
\
--
set ${{ github.event.repository.name }}.args.VCS_REF=${GITHUB_SHA::8}
\
--
tag
"${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}" \
--
set ${{ github.event.repository.name }}.tags=
"${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}" \
--file
Dockerfile .
--file
docker-compose.yaml
-
name
:
Docker Login
-
name
:
Docker Login
if
:
success()
if
:
success()
...
@@ -66,14 +66,14 @@ jobs:
...
@@ -66,14 +66,14 @@ jobs:
-
name
:
Docker Buildx (push)
-
name
:
Docker Buildx (push)
if
:
success()
if
:
success()
run
:
|
run
:
|
docker buildx b
uild
\
docker buildx b
ake
\
--
platform
${{ steps.prepare.outputs.docker_platforms }} \
--
set ${{ github.event.repository.name }}.platform=
${{ steps.prepare.outputs.docker_platforms }} \
--
output "type=image,push=true"
\
--
set ${{ github.event.repository.name }}.output=type=image,push=true
\
--
build-arg "VERSION=${{ steps.prepare.outputs.version }}"
\
--
set ${{ github.event.repository.name }}.args.VERSION=${{ steps.prepare.outputs.version }}
\
--
build-arg "BUILD_DATE=${{ steps.prepare.outputs.build_date }}"
\
--
set ${{ github.event.repository.name }}.args.BUILD_DATE=${{ steps.prepare.outputs.build_date }}
\
--
build-arg "VCS_REF=${GITHUB_SHA::8}"
\
--
set ${{ github.event.repository.name }}.args.VCS_REF=${GITHUB_SHA::8}
\
--
tag
"${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}" \
--
set ${{ github.event.repository.name }}.tags=
"${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}" \
--file
Dockerfile .
--file
docker-compose.yaml
-
name
:
Clear
-
name
:
Clear
if
:
always()
if
:
always()
...
...
Dockerfile
View file @
6e46ac03
FROM
golang:1-alpine as builder
FROM
--platform=$BUILDPLATFORM golang:1-alpine as builder
# Convert TARGETPLATFORM to GOARCH format
# https://github.com/tonistiigi/xx
COPY
--from=tonistiigi/xx:golang / /
ARG
TARGETPLATFORM
RUN
apk add
--no-cache
musl-dev git gcc
RUN
apk add
--no-cache
musl-dev git gcc
...
@@ -8,7 +14,7 @@ WORKDIR /src
...
@@ -8,7 +14,7 @@ WORKDIR /src
ENV
GO111MODULE=on
ENV
GO111MODULE=on
RUN
cd
cmd/gost
&&
go
build
RUN
cd
cmd/gost
&&
go
env
&&
go build
-v
FROM
alpine:latest
FROM
alpine:latest
...
...
docker-compose.yaml
0 → 100644
View file @
6e46ac03
version
:
"
3.4"
services
:
gost
:
build
:
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment