Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
quant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
quant
Commits
d9463bfa
Commit
d9463bfa
authored
1 year ago
by
Malte Bauch
Browse files
Options
Downloads
Patches
Plain Diff
Add a Dockerfile and gitignore
parent
f292ca2f
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!8
Create a monorepo for ekms and quantumlayer
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.dockerignore
+1
-0
1 addition, 0 deletions
.dockerignore
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
Dockerfile
+23
-0
23 additions, 0 deletions
Dockerfile
Makefile
+19
-0
19 additions, 0 deletions
Makefile
with
44 additions
and
0 deletions
.dockerignore
0 → 100644
+
1
−
0
View file @
d9463bfa
artifacts
This diff is collapsed.
Click to expand it.
.gitignore
0 → 100644
+
1
−
0
View file @
d9463bfa
artifacts
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
23
−
0
View file @
d9463bfa
ARG
GOLANG_VERSION=1.21
ARG
BUILDARGS
ARG
ACCESS_TOKEN_USR="nothing"
ARG
ACCESS_TOKEN_PWD="nothing"
FROM
${GITLAB_PROXY}golang:$GOLANG_VERSION-bookworm
as
builder
WORKDIR
/quantumlayer/
COPY
. .
# based on https://jwenz723.medium.com/fetching-private-go-modules-during-docker-build-5b76aa690280
RUN
printf
"machine code.fbi.h-da.de
\n\
login
${
ACCESS_TOKEN_USR
}
\n\
password
${
ACCESS_TOKEN_PWD
}
\n\
\n
"
\
>>
/root/.netrc
RUN
chmod
600 /root/.netrc
RUN
--mount
=
type
=
cache,target
=
/root/go/pkg/mod
\
--mount
=
type
=
cache,target
=
/root/.cache/go-build
\
make build
FROM
${GITLAB_PROXY}golang:$GOLANG_VERSION-bookworm
WORKDIR
/app/
COPY
--from=builder /quantumlayer/artifacts/quantumlayer ./quantumlayer
ENTRYPOINT
["./quantumlayer"]
This diff is collapsed.
Click to expand it.
Makefile
0 → 100644
+
19
−
0
View file @
d9463bfa
MAKEFILE_PATH
:=
$(
abspath
$(
lastword
$(
MAKEFILE_LIST
)))
MAKEFILE_DIR
:=
$(
dir
$(
MAKEFILE_PATH
))
GOPATH
:=
$(
~/go
)
GOCMD
=
go
GOBUILD
=
$(
GOCMD
)
build
GOCLEAN
=
$(
GOCMD
)
clean
BUILD_ARTIFACTS_PATH
=
artifacts
all
:
build
pre
:
mkdir
-p
$(
BUILD_ARTIFACTS_PATH
)
build
:
pre
$(
GOBUILD
)
-o
$(
BUILD_ARTIFACTS_PATH
)
/quantumlayer ./example/main.go
container
:
build
docker buildx build
--rm
-t
quantumlayer
--load
-f
./Dockerfile .
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment