forked from gobuffalo/buffalo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.build
36 lines (28 loc) · 1.31 KB
/
Dockerfile.build
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
FROM golang:1.17
EXPOSE 3000
ENV GOPROXY=https://proxy.golang.org
RUN apt-get update \
&& apt-get install -y -q build-essential sqlite3 libsqlite3-dev postgresql libpq-dev vim
# Installing Node 12
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash
RUN apt-get update && apt-get install nodejs
# Installing Postgres
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' \
&& wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add - \
&& apt-get update \
&& apt-get install -y -q postgresql postgresql-contrib libpq-dev\
&& rm -rf /var/lib/apt/lists/* \
&& service postgresql start && \
# Setting up password for postgres
su -c "psql -c \"ALTER USER postgres WITH PASSWORD 'postgres';\"" - postgres
# Installing yarn
RUN npm install -g --no-progress yarn \
&& yarn config set yarn-offline-mirror /npm-packages-offline-cache \
&& yarn config set yarn-offline-mirror-pruning true
# Install golangci
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0
# Installing buffalo binary
RUN go install github.com/gobuffalo/cli/cmd/buffalo@latest
RUN go get github.com/gobuffalo/buffalo-pop/v2
RUN mkdir /src
WORKDIR /src