Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
aon-tg-messenger
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
aon-tg-messenger
Commits
eea31436
Commit
eea31436
authored
Aug 21, 2024
by
贾浩@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update dockerfile
parent
910763c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
17 deletions
+8
-17
Dockerfile
Dockerfile
+8
-17
No files found.
Dockerfile
View file @
eea31436
FROM
golang:1.21-alpine AS base
# Set up dependencies
ENV
PACKAGES git openssh-client build-base
FROM
golang:1.21-alpine AS builder
# Install dependencies
RUN
apk add
--update
$PACKAGES
# Add source files
RUN
mkdir
-p
./sdk-api
COPY
./ ./sdk-api/
WORKDIR
/app
FROM
base AS build
COPY
. .
RUN
cd
sdk-api
&&
go mod tidy
&&
go build
-v
-o
/tmp/api ./cmd/api
&&
go build
-v
-o
/tmp/messenger ./cmd/messenger
RUN
go mod tidy
&&
go build
-v
-o
/tmp/api ./cmd/api
&&
go build
-v
-o
/tmp/messenger ./cmd/messenger
FROM
alpine
FROM
alpine
:latest
WORKDIR
/app
COPY
./config.toml
/config.toml
COPY
./config.toml
.
COPY
--from=build /tmp/api /usr/bin/api
COPY
--from=build
er
/tmp/api /usr/bin/api
COPY
--from=build /tmp/messenger /usr/bin/messenger
COPY
--from=build
er
/tmp/messenger /usr/bin/messenger
EXPOSE
8080
\ No newline at end of file
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