mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-12 10:22:14 +01:00
52 lines
1.3 KiB
Docker
52 lines
1.3 KiB
Docker
FROM thecodingmachine/gotenberg:base
|
|
|
|
ARG GOLANG_VERSION
|
|
|
|
# |--------------------------------------------------------------------------
|
|
# | Common libraries
|
|
# |--------------------------------------------------------------------------
|
|
# |
|
|
# | Libraries used in the build process of this image.
|
|
# |
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
git \
|
|
g++ \
|
|
gcc \
|
|
libc6-dev \
|
|
make \
|
|
pkg-config \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# |--------------------------------------------------------------------------
|
|
# | Golang
|
|
# |--------------------------------------------------------------------------
|
|
# |
|
|
# | Installs Golang.
|
|
# |
|
|
|
|
RUN wget https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz &&\
|
|
tar -xvf go${GOLANG_VERSION}.linux-amd64.tar.gz &&\
|
|
mv go /usr/local
|
|
|
|
ENV GOPATH /gotenberg/go
|
|
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
|
|
|
|
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" &&\
|
|
chmod -R 777 "$GOPATH"
|
|
|
|
# |--------------------------------------------------------------------------
|
|
# | Final touch
|
|
# |--------------------------------------------------------------------------
|
|
# |
|
|
# | Last instructions of this build.
|
|
# |
|
|
|
|
# Make sure the Gotenber user is able to
|
|
# call the Go binary.
|
|
USER gotenberg
|
|
|
|
RUN go version &&\
|
|
go env
|
|
|
|
USER root |