Skip to content

Commit

Permalink
comments added to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
n0rrman committed May 26, 2024
1 parent c9368dc commit d16e37b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
FROM golang:1.22.3-bullseye

# Install dependencies
WORKDIR /app

COPY go.mod go.sum ./
RUN go mod download

# Compile server
COPY hub/* ./

RUN CGO_ENABLED=0 GOOS=linux go build -o ./server

# Create user with only necessary access
RUN adduser --system --uid 1001 go
RUN chown go ./server

# Change to new user
USER go
WORKDIR /app

# Exposing port 80 (probably already exposed)
EXPOSE 80


EXPOSE 3000

# Run server
CMD ["./server"]

0 comments on commit d16e37b

Please sign in to comment.