mirror of
https://github.com/kazhuravlev/database-gateway.git
synced 2025-06-25 01:19:05 +00:00
37 lines
1.0 KiB
Docker
37 lines
1.0 KiB
Docker
# Database Gateway provides access to servers with ACL for safe and restricted database interactions.
|
|
# Copyright (C) 2024 Kirill Zhuravlev
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
FROM golang:1.23 AS builder
|
|
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /app/gateway ./cmd/gateway
|
|
|
|
FROM alpine:3.20
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/gateway /app/gateway
|
|
|
|
ENTRYPOINT ["/app/gateway"]
|
|
|
|
CMD ["run"]
|