-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathDockerfile
More file actions
80 lines (61 loc) · 1.87 KB
/
Copy pathDockerfile
File metadata and controls
80 lines (61 loc) · 1.87 KB
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
77
78
79
80
## Build
# CACHE_BUST: v15.55.2-alpha.2
FROM golang:1.24-alpine3.23 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.24-alpine3.23
# Enable Go toolchain automatic upgrades to prevent Go version errors in
# customer generations (GOTOOLCHAIN=local default in golang images)
ENV GOTOOLCHAIN=auto
RUN apk update
### Install common tools
RUN apk add --update --no-cache bash curl git wget
### Install Node / NPM
RUN apk add --update --no-cache nodejs npm
### Install Python
RUN apk add --update --no-cache python3 py3-pip python3-dev pipx
### Install Java
RUN apk add --update --no-cache openjdk11 gradle
### Install Ruby
#### gcompat is required on Alpine linux to support gcc ruby packages like sorbet
#### yaml-dev is required on Alpine Linux to support psych gem compilation for irb/rdoc
RUN apk add --update --no-cache build-base ruby ruby-bundler ruby-dev gcompat yaml-dev
### Install .NET
ENV DOTNET_ROOT=/usr/lib/dotnet
RUN apk add --update --no-cache dotnet8-sdk dotnet10-sdk
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel 6.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 \
php83 \
php83-ctype \
php83-dom \
php83-json \
php83-mbstring \
php83-phar \
php83-tokenizer \
php83-xml \
php83-xmlwriter \
php83-curl \
php83-openssl \
php83-iconv \
php83-session \
php83-fileinfo
RUN ln -sf /usr/bin/php83 /usr/bin/php
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"]