-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
76 lines (56 loc) · 1.9 KB
/
Dockerfile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
## Build
FROM golang:1.23-alpine3.20 as builder
WORKDIR /app
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY *.go ./
COPY internal/ ./internal/
COPY pkg/ ./pkg/
RUN go build -o /action
## Deploy
FROM golang:1.23-alpine3.20
RUN apk update
RUN apk add git
### Install Node / NPM
RUN apk add --update --no-cache nodejs npm
### Install Python
RUN apk add --update --no-cache python3 py3-pip python3-dev
### Install Poetry and validate
RUN apk add --update --no-cache poetry
RUN poetry --version
### Install Java
RUN apk add --update --no-cache openjdk11 gradle
### Install Ruby
RUN apk add --update --no-cache build-base ruby ruby-bundler ruby-dev
### Install .NET6.0
ENV DOTNET_ROOT=/usr/lib/dotnet
RUN apk add --update --no-cache dotnet6-sdk
### Install .NET5.0
RUN apk add --update --no-cache curl bash
# openssl1.1-compat is gradually getting removed from package managers..
RUN apk add --update --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing openssl1.1-compat
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel 5.0 -InstallDir ${DOTNET_ROOT}
### Install .NET8.0
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel 8.0 -InstallDir ${DOTNET_ROOT}
RUN dotnet --list-sdks
### Install PHP and Composer
#### Source: https://github.com/geshan/docker-php-composer-alpine/blob/master/Dockerfile
RUN apk --update --no-cache add wget \
curl \
git \
php82 \
php-ctype php-dom php-json php-mbstring php-phar php-tokenizer php-xml php-xmlwriter \
php-curl \
php-openssl \
php-iconv \
--repository http://nl.alpinelinux.org/alpine/edge/testing/
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
RUN mkdir -p /var/www
WORKDIR /var/www
COPY . /var/www
VOLUME /var/www
### END PHP
WORKDIR /
COPY --from=builder /action /action
ENTRYPOINT ["/action"]