mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-18 10:07:02 +00:00
Dockerfile now builds from golang:1.6-alpine
This commit is contained in:
8
.dockerignore
Normal file
8
.dockerignore
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
.dockerignore
|
||||||
|
.goxc.json
|
||||||
|
.goxc.local.json
|
||||||
|
.travis.yml
|
||||||
|
inbucket
|
||||||
|
inbucket.exe
|
||||||
|
swaks-tests
|
||||||
|
target
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
# Docker build file for Inbucket, see https://www.docker.io/
|
# Docker build file for Inbucket, see https://www.docker.io/
|
||||||
# Inbucket website: http://www.inbucket.org/
|
# Inbucket website: http://www.inbucket.org/
|
||||||
|
|
||||||
FROM golang:1.5
|
FROM golang:1.6-alpine
|
||||||
MAINTAINER James Hillyerd, @jameshillyerd
|
MAINTAINER James Hillyerd, @jameshillyerd
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
RUN apk update && apk add git
|
||||||
|
|
||||||
# Configuration (WORKDIR doesn't support env vars)
|
# Configuration (WORKDIR doesn't support env vars)
|
||||||
ENV INBUCKET_SRC $GOPATH/src/github.com/jhillyerd/inbucket
|
ENV INBUCKET_SRC $GOPATH/src/github.com/jhillyerd/inbucket
|
||||||
ENV INBUCKET_HOME /opt/inbucket
|
ENV INBUCKET_HOME /opt/inbucket
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
# install.sh
|
# install.sh
|
||||||
# description: Build, test, and install Inbucket. Should be executed inside a Docker container.
|
# description: Build, test, and install Inbucket. Should be executed inside a Docker container.
|
||||||
|
|
||||||
@@ -10,23 +10,23 @@ bindir="$installdir/bin"
|
|||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
export GOBIN="$bindir"
|
export GOBIN="$bindir"
|
||||||
builddate="$(date --iso-8601=seconds)"
|
builddate="$(date -Iseconds)"
|
||||||
cd "$srcdir"
|
cd "$srcdir"
|
||||||
go clean
|
go clean
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
echo "### Fetching Dependencies"
|
echo "### Fetching Dependencies"
|
||||||
go get -d -v ./...
|
go get -d -t -v ./...
|
||||||
go get -v github.com/stretchr/testify
|
|
||||||
|
|
||||||
echo "### Testing Inbucket"
|
echo "### Testing Inbucket"
|
||||||
go test ./...
|
go test ./...
|
||||||
|
|
||||||
echo "### Building Inbucket"
|
echo "### Building Inbucket"
|
||||||
mkdir -p "$bindir"
|
go build -o inbucket -ldflags "-X 'main.BUILDDATE=$builddate'" -v .
|
||||||
go build -o inbucket -race -ldflags "-X 'main.BUILD_DATE=$builddate'" -v .
|
|
||||||
|
|
||||||
echo "### Installing Inbucket"
|
echo "### Installing Inbucket"
|
||||||
|
mkdir -p "$bindir"
|
||||||
|
mkdir -p "/etc/opt"
|
||||||
mv inbucket "$bindir"
|
mv inbucket "$bindir"
|
||||||
install etc/docker/inbucket.conf /etc/opt/inbucket.conf
|
install etc/docker/inbucket.conf /etc/opt/inbucket.conf
|
||||||
install etc/docker/greeting.html /etc/opt/inbucket-greeting.html
|
install etc/docker/greeting.html /etc/opt/inbucket-greeting.html
|
||||||
|
|||||||
Reference in New Issue
Block a user