Skip to content

Commit

Permalink
feat: refactored Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolay200669 committed Apr 25, 2024
1 parent 12f7710 commit a3c6f30
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
FROM golang:latest
LABEL authors="nik"

# This dockerfile for run test Golang app
# Copy all files from current directory to /app in container
COPY . /app

# Set working directory
WORKDIR /app

# Run go test
CMD ["go", "test", "-v"]
COPY go.mod .
COPY go.sum .

RUN go mod download

COPY . .

# console run command
# docker build -t go-test .
CMD ["go", "test", "-v", "./..."]

0 comments on commit a3c6f30

Please sign in to comment.