-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-anybodycon-github-actions
47 lines (34 loc) · 1.76 KB
/
Dockerfile-anybodycon-github-actions
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
#syntax=docker/dockerfile:1.4
ARG ANYBODY_VERSION="8.0"
ARG ANYBODY_VERSION_PATCH="0"
ARG ANYBODY_BETA_SUFFIX=""
ARG ANYBODY_RC_SUFFIX=""
ARG BUILD_NUMBER="3"
ARG BASE_IMAGE="ghcr.io/anybody/anybodycon"
ARG TAG=${ANYBODY_VERSION}.${ANYBODY_VERSION_PATCH}${ANYBODY_BETA_SUFFIX}-${BUILD_NUMBER}
FROM ${BASE_IMAGE}:${TAG}
ARG ANYBODY_VERSION
ARG ANYBODY_VERSION_PATCH
ARG ANYBODY_BETA_SUFFIX
LABEL org.opencontainers.image.url https://github.com/AnyBody/anybody-container/pkgs/container/anybodycon-github-actions
LABEL org.opencontainers.image.title "anybodycon-github-actions"
LABEL org.opencontainers.image.description "Image with AnyBody and conda in a linux docker container and configured for github actions"
LABEL org.opencontainers.image.licenses "https://www.anybodytech.com/legal/software-license-agreement/"
# Change the default uid:gid to be easily compatible with github actions
ARG ANYBODY_USER=anybodyuser
ARG ANYBODY_USER_ID=1001
ARG ANYBODY_USER_GID=121
USER root
RUN usermod "--login=${ANYBODY_USER}" "--home=/home/${ANYBODY_USER}" \
--move-home "-u ${ANYBODY_USER_ID}" "${ANYBODY_USER}" && \
groupmod "--new-name=${ANYBODY_USER}" \
"-g ${ANYBODY_USER_GID}" "${ANYBODY_USER}"
RUN mkdir -p /github && chown -R ${ANYBODY_USER_ID}:${ANYBODY_USER_GID} /github && \
ln -s /home/${ANYBODY_USER} /github/home
# Change the GID/UID of wine to values which work with github actions
RUN chown ${ANYBODY_USER_ID}:${ANYBODY_USER_GID} /wine && \
chown -R ${ANYBODY_USER_ID}:${ANYBODY_USER_GID} /wine/drive_c/users/$ANYBODY_USER && \
chown ${ANYBODY_USER_ID}:${ANYBODY_USER_GID} /wine/user.reg && \
chown ${ANYBODY_USER_ID}:${ANYBODY_USER_GID} /wine/system.reg && \
chown -R ${ANYBODY_USER_ID}:${ANYBODY_USER_GID} /home/$ANYBODY_USER
USER $ANYBODY_USER