-
Notifications
You must be signed in to change notification settings - Fork 0
/
PodmanFile
44 lines (27 loc) · 892 Bytes
/
PodmanFile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright - Watchful Inc. 2024
#Strike Server
# Use an official Go image based on Alpine
FROM golang:alpine
# Install base packages
RUN apk add --no-cache bash curl
# Install OpenAPI Generator
RUN go install github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@latest
RUN oapi-codegen -version
# Install alpine respositories
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.6/main' >> /etc/apk/repositories
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.6/community' >> /etc/apk/repositories
RUN apk update
# Install PostgreSQL
RUN apk add --no-cache postgresql
# EXPOSE 5432 8080
EXPOSE 8080
WORKDIR /go/src/strike
COPY go.mod go.sum ./
RUN go mod download
COPY ./ ./
# Copy Go Source code to container
RUN go mod tidy
RUN CGO_ENABLED=0 go build -o /go/bin/strike.bin main.go
# Set the default command or entrypoint (optional)
#CMD ["bash"]
CMD ["/go/bin/strike.bin"]