Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docker/Dockerfile-build
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
FROM alpine:latest as build

RUN apk add --no-cache git make musl-dev go nodejs npm zip
RUN apk add --no-cache git make musl-dev go nodejs npm zip mingw-w64-gcc

ENV FACTORIO_BRANCH=develop
ENV GOROOT /usr/lib/go
ENV GOPATH /go
ENV PATH /go/bin:$PATH
ENV FACTORIO_ROOT /go/src/factorio-server-manager

COPY build-release.sh /usr/local/bin/build-release.sh
COPY docker/build-release.sh /usr/local/bin/build-release.sh
COPY ./ $FACTORIO_ROOT

RUN mkdir -p ${GOPATH}/bin
RUN chmod u+x /usr/local/bin/build-release.sh

WORKDIR $FACTORIO_ROOT

VOLUME /build
VOLUME $FACTORIO_ROOT

RUN ["/usr/local/bin/build-release.sh"]

Expand Down
6 changes: 4 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,13 @@ Authentication is supported in the application, but it is recommended to ensure
For development purposes it also has the ability to create the docker image from local sourcecode. This is done by running `build.sh` in the `docker` directory. This will delete all old executables and the node_modules directory (runs `make build`). The created docker image will have the tag `factorio-server-manager:dev`.

### Creating release bundles
A Dockerfile-build file is included for creating the release bundles.
A Dockerfile-build file is included for creating the release bundles. Use Docker version 20 in order to use the BUILDKIT environment, some issues have been encountered with Docker version 19.

To create the bundle build the Dockerfile-build file with the following command. The release bundles are output to the ./dist directory.

Run this command from the root factorio-server-manager directory.
```
DOCKER_BUILDKIT=1 docker build --no-cache -f Dockerfile-build -t ofsm-build --target=output -o dist .
DOCKER_BUILDKIT=1 docker build --no-cache -f docker/Dockerfile-build -t ofsm-build --target=build -o dist .
```

## For everyone who actually read this thing to the end
Expand Down
5 changes: 3 additions & 2 deletions docker/build-release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/sh

echo "Cloning ${FACTORIO_BRANCH}"
git clone -b ${FACTORIO_BRANCH} https://github.com/mroote/factorio-server-manager.git ${FACTORIO_ROOT}
go_version=$(go version)

echo "Go Version: ${go_version}"
echo "Creating build..."
make gen_release
echo "Copying build artifacts from ${PWD}"
Expand Down