Skip to content

Commit

Permalink
New docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
edudouglas committed Aug 16, 2019
1 parent cadf07d commit b4323fb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
9 changes: 0 additions & 9 deletions Dockerfile

This file was deleted.

21 changes: 21 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM golang:1.12.9-alpine3.9

WORKDIR /app

RUN apk update \
&& apk add --virtual build-deps gcc git \
&& rm -rf /var/cache/apk/*

RUN addgroup -S golang \
&& adduser -S -G golang golang

COPY . .

RUN go build ./cmd/...
RUN chmod +x mailroom
RUN chown -R golang /app

USER golang

EXPOSE 80
ENTRYPOINT ["./mailroom"]
10 changes: 10 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3"

services:
mailroom:
image: ${DOCKER_IMAGE_NAME:-ilhasoft/mailroom}:${DOCKER_IMAGE_TAG:-latest}
build:
context: ..
dockerfile: ./docker/Dockerfile
ports:
- 8080:80

0 comments on commit b4323fb

Please sign in to comment.