forked from gobuffalo/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.build
37 lines (28 loc) · 1.26 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
37
FROM golang:1.18
EXPOSE 3000
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
COPY buffalo /go/bin/buffalo
WORKDIR /
RUN go install github.com/gobuffalo/buffalo-pop/v3@latest
RUN mkdir /src
WORKDIR /src