Skip to content

Commit

Permalink
Bug/build error (#32)
Browse files Browse the repository at this point in the history
* Added macOS exclusions

* Build error fixed (user & group naming)
  • Loading branch information
aessing authored Oct 31, 2021
1 parent a069d03 commit 5b3cceb
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 10 deletions.
41 changes: 38 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,43 @@
# Exclude repository directories
docs/*

docs/\*

# Exlude repository files
*.md

\*.md

# Exclude project specific directories and files
support-scripts/*

support-scripts/\*

# General

.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r

Icon

# Thumbnails

.\_\*

# Files that might appear in the root of a volume

.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share

.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
18 changes: 11 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ ENV SERVER_NAME='Dedicated Server' \
CONFIG_PATH='/srv/bedrock-config' \
DATA_PATH='/srv/minecraft'
ARG DOWNLOAD_URL='https://www.minecraft.net/en-us/download/server/bedrock' \
UIDGID='10999'
UIDGID='10999' \
USERGROUPNAME='minecraft'
EXPOSE ${SERVER_PORT}/udp \
${SERVER_PORTv6}/udp
VOLUME ${DATA_PATH}
Expand All @@ -75,6 +76,9 @@ RUN apt-get update -y \
libcurl4 \
libssl1.1 \
unzip \
&& apt-get dist-upgrade -y \
&& apt-get autoremove -y \
&& apt-get autoclean -y \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p ${SERVER_PATH} \
&& mkdir -p ${CONFIG_PATH} \
Expand All @@ -91,12 +95,12 @@ RUN chmod a+x ${CONFIG_PATH}/entrypoint.sh

###############################################################################
# Run in non-root context
RUN groupadd -g ${UIDGID} -r ${UIDGID} \
&& useradd --no-log-init -g ${UIDGID} -r -s /bin/false -u ${UIDGID} ${UIDGID} \
&& chown -R ${UIDGID}.${UIDGID} ${SERVER_PATH} \
&& chown -R ${UIDGID}.${UIDGID} ${CONFIG_PATH} \
&& chown -R ${UIDGID}.${UIDGID} ${DATA_PATH}
USER ${UIDGID}
RUN groupadd -g ${UIDGID} -r ${USERGROUPNAME} \
&& useradd --no-log-init -g ${USERGROUPNAME} -r -s /bin/false -u ${UIDGID} ${USERGROUPNAME} \
&& chown -R ${USERGROUPNAME}.${USERGROUPNAME} ${SERVER_PATH} \
&& chown -R ${USERGROUPNAME}.${USERGROUPNAME} ${CONFIG_PATH} \
&& chown -R ${USERGROUPNAME}.${USERGROUPNAME} ${DATA_PATH}
USER ${USERGROUPNAME}

###############################################################################
# Start Bedrock Server
Expand Down

0 comments on commit 5b3cceb

Please sign in to comment.