-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (30 loc) · 1.35 KB
/
Dockerfile
File metadata and controls
39 lines (30 loc) · 1.35 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
FROM ubuntu:20.04
LABEL authors.maintainer "GDK contributors: https://gitlab.com/gitlab-org/gitlab-development-kit/-/graphs/main"
## We are building this docker file with an experimental --squash in order
## to reduce the resulting layer size: https://docs.docker.com/engine/reference/commandline/build/#squash-an-images-layers---squash-experimental
##
## The CI script that build this file can be found under: support/docker
ENV DEBIAN_FRONTEND=noninteractive
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
RUN apt-get update && apt-get install -y sudo locales locales-all software-properties-common \
&& add-apt-repository ppa:git-core/ppa -y
RUN useradd --user-group --create-home --groups sudo gdk
RUN echo "gdk ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/gdk_no_password
WORKDIR /home/gdk/tmp
RUN chown -R gdk:gdk /home/gdk
USER gdk
COPY --chown=gdk . .
ENV PATH="/home/gdk/.asdf/shims:/home/gdk/.asdf/bin:${PATH}"
RUN bash ./support/bootstrap \
# simple tests that tools work
&& bash -lec "asdf version; yarn --version; node --version; ruby --version" \
# Remove unneeded packages
&& sudo apt-get purge software-properties-common -y \
&& sudo apt-get autoremove -y \
# clear tmp caches e.g. from postgres compilation
&& sudo rm -rf /tmp/* ~/.asdf/tmp/* \
# Remove files we copied in
&& sudo rm -rf /home/gdk/tmp
WORKDIR /home/gdk